diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2023-11-20 20:02:36 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2023-11-20 20:47:22 +0100 |
| commit | 1f11529837c69781179c7deea832f0b8b266305f (patch) | |
| tree | 64e5614f1d1907e7ee9859889b4f4946e921bdf3 /src/input_handler.hh | |
| parent | 4499b26ca4541b7c404db2de672506e89a0f9ce1 (diff) | |
rc tools menu: replace menu builtin with a prompt-based implementation
prompt has fuzzy filtering which is more discoverable than the menu
mode's regex filtering (because that one needs / to trigger it).
There are no important differences left, so replace the menu builtin
with a prompt-based command.
prompt does not support markup in the completion menu, so drop that
feature for now.
Diffstat (limited to 'src/input_handler.hh')
| -rw-r--r-- | src/input_handler.hh | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh index a26d392c..eeb42464 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -16,14 +16,6 @@ namespace Kakoune { -enum class MenuEvent -{ - Select, - Abort, - Validate -}; -using MenuCallback = std::function<void (int, MenuEvent, Context&)>; - enum class PromptEvent { Change, @@ -85,12 +77,6 @@ public: void set_prompt_face(Face prompt_face); bool history_enabled() const; - // enter menu mode, callback is called on each selection change, - // abort or validation with corresponding MenuEvent value - // returns to normal mode after validation if callback does - // not change the mode itself - void menu(Vector<DisplayLine> choices, MenuCallback callback); - // execute callback on next keypress and returns to normal mode // if callback does not change the mode itself void on_next_key(StringView mode_name, KeymapMode mode, KeyCallback callback, |
