diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-11-08 19:08:23 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-11-08 19:08:23 +0000 |
| commit | 88aa707b9c7f06e70843e2e70da92fac7ceafa52 (patch) | |
| tree | f18e466a67cfa4fe86bcc2e1f3e325c30814df38 /src/normal.cc | |
| parent | e1fc2677e3a01b779c689a971cd2207ef08746d7 (diff) | |
For {Menu,Info}Style::Prompt, choose the anchor directly in ncurses code
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/normal.cc b/src/normal.cc index 5d258e59..18c2fe8b 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -114,9 +114,7 @@ bool show_auto_info_ifn(StringView title, StringView info, if (context.options()["autoinfo"].get<int>() < 1 or not context.has_ui()) return false; Face face = get_face("Information"); - CharCoord pos = context.window().dimensions(); - pos.column -= 1; - context.ui().info_show(title, info, pos, face, InfoStyle::Prompt); + context.ui().info_show(title, info, CharCoord{}, face, InfoStyle::Prompt); return true; } @@ -363,10 +361,8 @@ void command(Context& context, int) { auto info = CommandManager::instance().command_info(context, cmdline); Face col = get_face("Information"); - CharCoord pos = context.window().dimensions(); - pos.column -= 1; if (not info.first.empty() and not info.second.empty()) - context.ui().info_show(info.first, info.second, pos , col, InfoStyle::Prompt); + context.ui().info_show(info.first, info.second, CharCoord{}, col, InfoStyle::Prompt); } } if (event == PromptEvent::Validate) @@ -567,9 +563,7 @@ void regex_prompt(Context& context, const String prompt, T func) if (context.has_ui()) { Face face = get_face("Information"); - CharCoord pos = context.window().dimensions(); - pos.column -= 1; - context.ui().info_show("regex error", err.what(), pos, face, InfoStyle::Prompt); + context.ui().info_show("regex error", err.what(), CharCoord{}, face, InfoStyle::Prompt); } } } |
