summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2022-02-15 20:46:38 +1100
committerMaxime Coste <mawww@kakoune.org>2022-02-15 20:46:38 +1100
commit17237fb8878dff5d289e702ffcc1c69de263aec0 (patch)
treec64605926de4ebc8445d67acfb7f89f90bb90112 /src
parentb6a9fd6e3a5178732aad5a378ad3b618d21239d4 (diff)
parente6d0ff1bc86a65f80ad3f8f05b46e66a8a02e65f (diff)
Merge remote-tracking branch 'krobelus/different-select-cmd-no-dupe'
Diffstat (limited to 'src')
-rw-r--r--src/insert_completer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc
index f32b35ca..86076b45 100644
--- a/src/insert_completer.cc
+++ b/src/insert_completer.cc
@@ -322,7 +322,8 @@ InsertCompletion complete_option(const SelectionList& sels,
candidates.reserve(matches.size());
while (candidates.size() < max_count and first != last)
{
- if (candidates.empty() or candidates.back().completion != first->candidate())
+ if (candidates.empty() or candidates.back().completion != first->candidate()
+ or candidates.back().on_select != first->on_select)
candidates.push_back({ first->candidate().str(), first->on_select.str(),
std::move(first->menu_entry) });
std::pop_heap(first, last--, greater);