diff --git a/src/input_handler.cc b/src/input_handler.cc index 2c23af80..c0d7b5ed 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -737,6 +737,8 @@ public: } if (res.empty()) return {}; + std::sort(res.begin(), res.end()); + res.erase(std::unique(res.begin(), res.end()), res.end()); return { cursor_pos.line, cursor_pos, std::move(res), buffer.timestamp() }; }