summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-09 20:19:40 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-09 20:19:40 +0100
commit7cf5839287de6f65c981a876d8a1c7e6f8d2494b (patch)
tree932dbdd7a9f61a8e70cbec1fb96d452c92818d3c
parent375141e1f80dced9be738568a3418f65813f4a2f (diff)
downloadvim-git-7cf5839287de6f65c981a876d8a1c7e6f8d2494b.tar.gz
patch 9.0.0431: current mode shows in message windowv9.0.0431
Problem: Current mode shows in message window. Solution: Reset in_echowindow before redrawing. (issue #11094)
-rw-r--r--src/popupwin.c3
-rw-r--r--src/testdir/dumps/Test_echowin_showmode.dump8
-rw-r--r--src/testdir/test_messages.vim20
-rw-r--r--src/version.c2
4 files changed, 32 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c
index 5f003803b..a33fa5f8b 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -4545,6 +4545,8 @@ start_echowindow(void)
void
end_echowindow(void)
{
+ in_echowindow = FALSE;
+
// show the message window now
redraw_cmd(FALSE);
@@ -4553,7 +4555,6 @@ end_echowindow(void)
msg_didout = TRUE;
if (msg_col == 0)
msg_col = 1;
- in_echowindow = FALSE;
}
#endif
diff --git a/src/testdir/dumps/Test_echowin_showmode.dump b/src/testdir/dumps/Test_echowin_showmode.dump
new file mode 100644
index 000000000..24eb4d023
--- /dev/null
+++ b/src/testdir/dumps/Test_echowin_showmode.dump
@@ -0,0 +1,8 @@
+>o+0&#ffffff0|n+0&#e0e0e08|e| | +0&#ffffff0@70
+|t|w|o| @71
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|═+0#e000002&@74
+|e|c|h|o| |w|i|n|d|o|w| @63
+|-+2#0000000&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@29|1| @8|1|,|1| @10|A|l@1|
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index 07a4b229a..4a2deae1e 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -440,5 +440,25 @@ func Test_echowin_eval()
call delete('XtestEchowindow')
endfunc
+" messages window should not be used for showing the mode
+func Test_echowin_showmode()
+ CheckScreendump
+
+ let lines =<< trim END
+ vim9script
+ setline(1, ['one', 'two'])
+ timer_start(100, (_) => {
+ echowin 'echo window'
+ })
+ normal V
+ END
+ call writefile(lines, 'XtestEchowinMode', 'D')
+ let buf = RunVimInTerminal('-S XtestEchowinMode', #{rows: 8})
+ call VerifyScreenDump(buf, 'Test_echowin_showmode', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 3b02a3b11..eb979bc04 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 431,
+/**/
430,
/**/
429,