patch 9.0.0683: cannot specify a time for :echowindow
Problem: Cannot specify a time for :echowindow.
Solution: A count can be used to specify the display time. Add
popup_findecho().
diff --git a/src/testdir/dumps/Test_echowindow_8.dump b/src/testdir/dumps/Test_echowindow_8.dump
index d57d437..cb5b50d 100644
--- a/src/testdir/dumps/Test_echowindow_8.dump
+++ b/src/testdir/dumps/Test_echowindow_8.dump
@@ -4,5 +4,5 @@
|═+0#e000002&@74
|l|a|t|e|r| |m|e|s@1|a|g|e| @61
|m|o|r|e| @70
-|:+0#0000000&|e|c|h|o|w|i|n| |'|m|o|r|e|'| @59
+|:+0#0000000&|7|e|c|h|o|w|i|n| |'|m|o|r|e|'| @58
@57|0|,|0|-|1| @8|A|l@1|
diff --git a/src/testdir/dumps/Test_echowindow_9.dump b/src/testdir/dumps/Test_echowindow_9.dump
new file mode 100644
index 0000000..2efdef0
--- /dev/null
+++ b/src/testdir/dumps/Test_echowindow_9.dump
@@ -0,0 +1,8 @@
+| +8#0000001#e0e0e08|+| |[|N|o| |N|a|m|e|]| | +2#0000000#ffffff0|[|N|o| |N|a|m|e|]| | +1&&@49|X+8#0000001#e0e0e08
+> +0#0000000#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|:+0#0000000&|c|a|l@1| |H|i|d|e|W|i|n|(|)| @59
+@57|0|,|0|-|1| @8|A|l@1|
diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim
index 24995f1..ab33caa 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -511,6 +511,10 @@
echo 'two'
echo 'three'
enddef
+
+ def HideWin()
+ popup_hide(popup_findecho())
+ enddef
END
call writefile(lines, 'XtestEchowindow', 'D')
let buf = RunVimInTerminal('-S XtestEchowindow', #{rows: 8})
@@ -536,9 +540,12 @@
call VerifyScreenDump(buf, 'Test_echowindow_7', {})
call term_sendkeys(buf, ":tabnew\<CR>")
- call term_sendkeys(buf, ":echowin 'more'\<CR>")
+ call term_sendkeys(buf, ":7echowin 'more'\<CR>")
call VerifyScreenDump(buf, 'Test_echowindow_8', {})
+ call term_sendkeys(buf, ":call HideWin()\<CR>")
+ call VerifyScreenDump(buf, 'Test_echowindow_9', {})
+
" clean up
call StopVimInTerminal(buf)
endfunc
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index a59b55d..56d7f0c 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -2367,6 +2367,7 @@
echoerr 'went' .. 'wrong'
var local = 'window'
echowin 'in' local
+ :5echowin 'five'
enddef
def Test_disassemble_echomsg()
@@ -2389,6 +2390,9 @@
'\d\+ PUSHS "in"\_s*' ..
'\d\+ LOAD $0\_s*' ..
'\d\+ ECHOWINDOW 2\_s*' ..
+ ":5echowin 'five'\\_s*" ..
+ '\d\+ PUSHS "five"\_s*' ..
+ '\d\+ ECHOWINDOW 1 (5 sec)\_s*' ..
'\d\+ RETURN void',
res)
enddef