diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-11-12 13:57:14 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-11-12 13:57:14 +0000 |
| commit | 2113b829df79f1c7427a368c84d3ffdf3d6328ae (patch) | |
| tree | 19a7f79fea6e04178914676b2d85b9c7d1e825e1 /src | |
| parent | 2026aac26bfd330b98dda276df1f4eb133d823f0 (diff) | |
Show an info box explaining that spaces disable history recording in command prompt
Fixes #477
Diffstat (limited to 'src')
| -rw-r--r-- | src/normal.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/normal.cc b/src/normal.cc index 8d557dbf..2b279ace 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -351,10 +351,14 @@ void command(Context& context, NormalParams) context.ui().info_hide(); if (event == PromptEvent::Change and context.options()["autoinfo"].get<int>() > 0) { + Face face = get_face("Information"); + if (cmdline.length() == 1 and is_horizontal_blank(cmdline[0_byte])) + context.ui().info_show("prompt", "commands preceded by a blank wont be saved to history", + CharCoord{}, face, InfoStyle::Prompt); + auto info = CommandManager::instance().command_info(context, cmdline); - Face col = get_face("Information"); if (not info.first.empty() and not info.second.empty()) - context.ui().info_show(info.first, info.second, CharCoord{}, col, InfoStyle::Prompt); + context.ui().info_show(info.first, info.second, CharCoord{}, face, InfoStyle::Prompt); } } if (event == PromptEvent::Validate) |
