diff --git a/src/commands.cc b/src/commands.cc index 812d8b19..d5d2b7ce 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -883,7 +883,8 @@ Completions highlighter_cmd_completer( StringView path = params[0]; auto sep_it = find(path, '/'); if (sep_it == path.end()) - return { 0_byte, pos_in_token, complete(path, pos_in_token, highlighter_scopes) }; + return { 0_byte, pos_in_token, complete(path, pos_in_token, highlighter_scopes), + Completions::Flags::Menu }; StringView scope{path.begin(), sep_it}; HighlighterGroup* root = nullptr; @@ -900,7 +901,8 @@ Completions highlighter_cmd_completer( else if (add and token_to_complete == 1) { StringView name = params[1]; - return { 0_byte, name.length(), complete(name, pos_in_token, HighlighterRegistry::instance() | transform(&HighlighterRegistry::Item::key)) }; + return { 0_byte, name.length(), complete(name, pos_in_token, HighlighterRegistry::instance() | transform(&HighlighterRegistry::Item::key)), + Completions::Flags::Menu }; } else return {}; diff --git a/src/highlighter_group.cc b/src/highlighter_group.cc index d5d43198..e23b5979 100644 --- a/src/highlighter_group.cc +++ b/src/highlighter_group.cc @@ -75,7 +75,8 @@ Completions HighlighterGroup::complete_child(StringView path, ByteCount cursor_p | transform([](auto& hl) { return hl.value->has_children() ? hl.key + "/" : hl.key; }) | gather>()); - return { 0, 0, std::move(candidates) }; + auto completions_flags = group ? Completions::Flags::None : Completions::Flags::Menu; + return { 0, 0, std::move(candidates), completions_flags }; } void Highlighters::highlight(HighlightContext context, DisplayBuffer& display_buffer, BufferRange range) diff --git a/src/highlighters.cc b/src/highlighters.cc index 39fd28fd..cfb24f6c 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -2089,7 +2089,8 @@ public: } auto container = m_regions | transform(&decltype(m_regions)::Item::key); - return { 0, 0, complete(path, cursor_pos, container) }; + auto completions_flags = group ? Completions::Flags::None : Completions::Flags::Menu; + return { 0, 0, complete(path, cursor_pos, container), completions_flags }; } static std::unique_ptr create(HighlighterParameters params, Highlighter*)