summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-08-06 11:35:38 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-08-06 11:35:38 +0200
commit535a454349f4aa647644d8eef99c517c15ddbec8 (patch)
treef7c094af0e62f92486fa67067ed7470bb0357ab9 /src/input_handler.cc
parent9148b1ae92024ea4974299e87788a58d67635664 (diff)
Line completion: sort and uniquify lines
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc2
1 files changed, 2 insertions, 0 deletions
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() };
}