diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-07-08 20:25:09 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-07-10 19:22:14 +0100 |
| commit | b6979e2d2cb1fe60e94beec0075ed55a26069595 (patch) | |
| tree | 81f7a55b28886b299b56cf797e2c059a93acc7cc /src/input_handler.cc | |
| parent | 4c3bd68876841ad9547f1d270c36a78d5a68cfed (diff) | |
Add docstring for normal mode commands and display them if autoinfo >= 2
Diffstat (limited to 'src/input_handler.cc')
| -rw-r--r-- | src/input_handler.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc index a440dc1a..2e4a58f8 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -106,7 +106,16 @@ public: } auto it = keymap.find(key); if (it != keymap.end()) - it->second(context(), m_count); + { + if (context().options()["autoinfo"].get<int>() >= 2 and context().has_ui()) + { + ColorPair col = get_color("Information"); + CharCoord pos = context().window().dimensions(); + pos.column -= 1; + context().ui().info_show(key_to_str(key), it->second.docstring, pos, col, MenuStyle::Prompt); + } + it->second.func(context(), m_count); + } m_count = 0; } |
