diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-08-11 20:36:07 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-08-11 20:36:07 +0100 |
| commit | 7086135fa65d47e4b53226e0beea7bc3f720a0be (patch) | |
| tree | c540f1f83008b20eb5c47497369cc6d5d962d4a6 /src/normal.cc | |
| parent | dac4fdaa54e0290a10c301835ab51140c2cd2bd7 (diff) | |
Display auto info on register insertion/explicit insert completion
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/normal.cc b/src/normal.cc index 7613258c..90487fc0 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -96,29 +96,6 @@ void repeat_last_insert(Context& context, NormalParams) context.input_handler().repeat_last_insert(); } -bool show_auto_info_ifn(StringView title, StringView info, - const Context& context) -{ - if (context.options()["autoinfo"].get<int>() < 1 or not context.has_ui()) - return false; - Face face = get_face("Information"); - context.ui().info_show(title, info, CharCoord{}, face, InfoStyle::Prompt); - return true; -} - -template<typename Cmd> -void on_next_key_with_autoinfo(const Context& context, KeymapMode keymap_mode, Cmd cmd, - StringView title, StringView info) -{ - const bool hide = show_auto_info_ifn(title, info, context); - context.input_handler().on_next_key( - keymap_mode, [hide,cmd](Key key, Context& context) mutable { - if (hide) - context.ui().info_hide(); - cmd(key, context); - }); -} - template<SelectMode mode> void goto_commands(Context& context, NormalParams params) { |
