From 0a06d9acbdebf428f4945f0d1575c091a0619b1d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 13 Aug 2023 03:10:52 +1000 Subject: [PATCH] Minor formatting tweaks --- src/input_handler.hh | 6 +++--- src/normal.cc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input_handler.hh b/src/input_handler.hh index 4a776e84..00d2d53a 100644 --- a/src/input_handler.hh +++ b/src/input_handler.hh @@ -31,6 +31,7 @@ enum class PromptEvent Validate }; using PromptCallback = std::function; + enum class PromptFlags { None = 0, @@ -40,7 +41,6 @@ enum class PromptFlags }; constexpr bool with_bit_ops(Meta::Type) { return true; } - using KeyCallback = std::function; class InputMode; @@ -199,9 +199,9 @@ void on_next_key_with_autoinfo(const Context& context, StringView mode_name, bool hide = should_show_info(AutoInfo::OnKey, context); hide_auto_info_ifn(context, hide); cmd(key, context); - }, [&context, title=std::move(title), info=std::move(info)](Timer&) { + }, [&context, title=std::move(title), info=std::move(info)](Timer&) { show_auto_info_ifn(title, info, AutoInfo::OnKey, context); - }); + }); } void scroll_window(Context& context, LineCount offset, bool mouse_dragging = false); diff --git a/src/normal.cc b/src/normal.cc index 386eee5b..27c1e47e 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -44,6 +44,7 @@ constexpr auto enum_desc(Meta::Type) { SelectMode::Append, "append" }, }); } + void merge_selections(Selection& sel, const Selection& new_sel) { const bool forward = sel.cursor() >= sel.anchor();