From 7086135fa65d47e4b53226e0beea7bc3f720a0be Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 11 Aug 2015 20:36:07 +0100 Subject: Display auto info on register insertion/explicit insert completion --- src/normal.cc | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/normal.cc') 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() < 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 -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 void goto_commands(Context& context, NormalParams params) { -- cgit v1.2.3