Skip to content

Commit 7cf5839

Browse files
committed
patch 9.0.0431: current mode shows in message window
Problem: Current mode shows in message window. Solution: Reset in_echowindow before redrawing. (issue #11094)
1 parent 375141e commit 7cf5839

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

src/popupwin.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4545,6 +4545,8 @@ start_echowindow(void)
45454545
void
45464546
end_echowindow(void)
45474547
{
4548+
in_echowindow = FALSE;
4549+
45484550
// show the message window now
45494551
redraw_cmd(FALSE);
45504552

@@ -4553,7 +4555,6 @@ end_echowindow(void)
45534555
msg_didout = TRUE;
45544556
if (msg_col == 0)
45554557
msg_col = 1;
4556-
in_echowindow = FALSE;
45574558
}
45584559
#endif
45594560

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
>o+0&#ffffff0|n+0&#e0e0e08|e| | +0&#ffffff0@70
2+
|t|w|o| @71
3+
|~+0#4040ff13&| @73
4+
|~| @73
5+
|~| @73
6+
|═+0#e000002&@74
7+
|e|c|h|o| |w|i|n|d|o|w| @63
8+
|-+2#0000000&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@29|1| @8|1|,|1| @10|A|l@1|

src/testdir/test_messages.vim

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,25 @@ func Test_echowin_eval()
440440
call delete('XtestEchowindow')
441441
endfunc
442442

443+
" messages window should not be used for showing the mode
444+
func Test_echowin_showmode()
445+
CheckScreendump
446+
447+
let lines =<< trim END
448+
vim9script
449+
setline(1, ['one', 'two'])
450+
timer_start(100, (_) => {
451+
echowin 'echo window'
452+
})
453+
normal V
454+
END
455+
call writefile(lines, 'XtestEchowinMode', 'D')
456+
let buf = RunVimInTerminal('-S XtestEchowinMode', #{rows: 8})
457+
call VerifyScreenDump(buf, 'Test_echowin_showmode', {})
458+
459+
" clean up
460+
call StopVimInTerminal(buf)
461+
endfunc
462+
443463

444464
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ static char *(features[]) =
703703

704704
static int included_patches[] =
705705
{ /* Add new patch number below this line */
706+
/**/
707+
431,
706708
/**/
707709
430,
708710
/**/

0 commit comments

Comments
 (0)