From 88aa707b9c7f06e70843e2e70da92fac7ceafa52 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 8 Nov 2014 19:08:23 +0000 Subject: For {Menu,Info}Style::Prompt, choose the anchor directly in ncurses code --- src/input_handler.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index 5db479f1..630bc2f1 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -114,12 +114,8 @@ public: if (it != keymap.end()) { if (context().options()["autoinfo"].get() >= 2 and context().has_ui()) - { - Face col = get_face("Information"); - CharCoord pos = context().window().dimensions(); - pos.column -= 1; - context().ui().info_show(key_to_str(key), it->second.docstring, pos, col, InfoStyle::Prompt); - } + context().ui().info_show(key_to_str(key), it->second.docstring, CharCoord{}, + get_face("Information"), InfoStyle::Prompt); it->second.func(context(), m_count); } m_count = 0; @@ -330,8 +326,7 @@ public: { if (not context().has_ui()) return; - CharCoord menu_pos{ context().ui().dimensions().line, 0_char }; - context().ui().menu_show(choices, menu_pos, get_face("MenuForeground"), + context().ui().menu_show(choices, CharCoord{}, get_face("MenuForeground"), get_face("MenuBackground"), MenuStyle::Prompt); context().ui().menu_select(0); } @@ -683,11 +678,8 @@ private: line.byte_count_to(m_line_editor.cursor_pos())); CandidateList& candidates = m_completions.candidates; if (context().has_ui() and not candidates.empty()) - { - CharCoord menu_pos{ context().ui().dimensions().line, 0_char }; - context().ui().menu_show(candidates, menu_pos, get_face("MenuForeground"), + context().ui().menu_show(candidates, CharCoord{}, get_face("MenuForeground"), get_face("MenuBackground"), MenuStyle::Prompt); - } } catch (runtime_error&) {} } -- cgit v1.2.3