diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-06-03 12:06:29 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-06-03 12:17:38 +1000 |
| commit | 2bdbf7e379412ff4461871c1eb342948f90f51ca (patch) | |
| tree | 4df85311f992a50f442bcf3184f94f20bcf29bb6 /src/input_handler.cc | |
| parent | 56e5322b452ada676ca03884d7e813f42e007013 (diff) | |
Add MenuStyle::Search that prevents the menu from hiding buffer text
Fixes #2042
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index 88dfa28a..03e17f09 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -954,7 +954,9 @@ private: Vector<DisplayLine> items; for (auto& candidate : m_completions.candidates) items.push_back({ candidate, {} }); - context().client().menu_show(items, {}, MenuStyle::Prompt); + + const auto menu_style = (m_flags & PromptFlags::Search) ? MenuStyle::Search : MenuStyle::Prompt; + context().client().menu_show(items, {}, menu_style); auto prefix = line.substr(m_completions.start, m_completions.end - m_completions.start); if (not contains(m_completions.candidates, prefix)) |
