1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-21 02:21:32 +03:00

Uniquify candidates in -shell-candidates mode

This commit is contained in:
Maxime Coste 2016-03-28 14:16:45 +01:00
parent c8490c4e86
commit 75e9bbfa43

View File

@ -866,6 +866,7 @@ void define_command(const ParametersParser& parser, Context& context, const Shel
matches.push_back(match);
}
std::sort(matches.begin(), matches.end());
matches.erase(std::unique(matches.begin(), matches.end()), matches.end());
CandidateList res;
for (auto& m : matches)
res.push_back(m.candidate().str());