aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/map.txt3
-rw-r--r--src/nvim/cmdexpand.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 60cc915a4a..c4bacfd632 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -215,6 +215,9 @@ The search string will not be echoed when using this mapping. Messages from
the executed command are still given though. To shut them up too, add a
":silent" in the executed command: >
:map <silent> ,h :exe ":silent normal /Header\r"<CR>
+Note that the effect of a command might also be silenced, e.g., when the
+mapping selects another entry for command line completion it won't be
+displayed.
Prompts will still be given, e.g., for inputdialog().
Using "<silent>" for an abbreviation is possible, but will cause redrawing of
the command line to fail.
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index ef742525da..e0bf562bb8 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -173,7 +173,9 @@ int nextwild(expand_T *xp, int type, int options, bool escape)
return FAIL;
}
- if (!(ui_has(kUICmdline) || ui_has(kUIWildmenu))) {
+ // If cmd_silent is set then don't show the dots, because redrawcmd() below
+ // won't remove them.
+ if (!cmd_silent && !(ui_has(kUICmdline) || ui_has(kUIWildmenu))) {
msg_puts("..."); // show that we are busy
ui_flush();
}