aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Abelli <carlo@abelli.xyz>2019-05-02 09:38:21 +0000
committerJustin M. Keyes <justinkz@gmail.com>2019-05-02 11:38:21 +0200
commit49c51f839b537ac8ff60671030a8d7b2399ad4a7 (patch)
treeb6a98ce5db46c43e1448890bf677047bd2738538
parent53cef34f16635aba04d4443c4d94a18a34a38eca (diff)
downloadrneovim-49c51f839b537ac8ff60671030a8d7b2399ad4a7.tar.gz
rneovim-49c51f839b537ac8ff60671030a8d7b2399ad4a7.tar.bz2
rneovim-49c51f839b537ac8ff60671030a8d7b2399ad4a7.zip
ex_getln: fix statusline redraw logic #9967
fixes #9908
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--test/functional/ui/cmdline_spec.lua25
2 files changed, 26 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index ece2b59bc6..b16023b0ec 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -366,7 +366,7 @@ static uint8_t *command_line_enter(int firstc, long count, int indent)
// redraw the statusline for statuslines that display the current mode
// using the mode() function.
- if (KeyTyped && msg_scrolled == 0) {
+ if (!cmd_silent && msg_scrolled == 0) {
curwin->w_redr_status = true;
redraw_statuslines();
}
diff --git a/test/functional/ui/cmdline_spec.lua b/test/functional/ui/cmdline_spec.lua
index 16be846647..5d563895d6 100644
--- a/test/functional/ui/cmdline_spec.lua
+++ b/test/functional/ui/cmdline_spec.lua
@@ -116,6 +116,31 @@ local function test_cmdline(linegrid)
}}}
end)
+ it('from normal mode when : is mapped', function()
+ command('nnoremap ; :')
+
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {3:n }|
+ |
+ ]]}
+
+ feed(';')
+ screen:expect{grid=[[
+ ^ |
+ {1:~ }|
+ {1:~ }|
+ {3:c }|
+ |
+ ]], cmdline={{
+ firstc = ":",
+ content = {{""}},
+ pos = 0,
+ }}}
+ end)
+
it('but not with scrolled messages', function()
screen:try_resize(35,10)
feed(':echoerr doesnotexist<cr>')