patch 9.0.0350: :echowindow does not work in a compiled function
Problem: :echowindow does not work in a compiled function.
Solution: Handle the expression at compile time.
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 2f94f05..a1311ee 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -2858,10 +2858,12 @@
// :execute {string} ...
// :echomsg {string} ...
+ // :echowindow {string} ...
// :echoconsole {string} ...
// :echoerr {string} ...
case ISN_EXECUTE:
case ISN_ECHOMSG:
+ case ISN_ECHOWINDOW:
case ISN_ECHOCONSOLE:
case ISN_ECHOERR:
{
@@ -2932,6 +2934,14 @@
msg_attr(ga.ga_data, echo_attr);
out_flush();
}
+#ifdef HAS_MESSAGE_WINDOW
+ else if (iptr->isn_type == ISN_ECHOWINDOW)
+ {
+ start_echowindow();
+ msg_attr(ga.ga_data, echo_attr);
+ end_echowindow();
+ }
+#endif
else if (iptr->isn_type == ISN_ECHOCONSOLE)
{
ui_write(ga.ga_data, (int)STRLEN(ga.ga_data),
@@ -5570,6 +5580,10 @@
smsg("%s%4d ECHOMSG %lld", pfx, current,
(varnumber_T)(iptr->isn_arg.number));
break;
+ case ISN_ECHOWINDOW:
+ smsg("%s%4d ECHOWINDOW %lld", pfx, current,
+ (varnumber_T)(iptr->isn_arg.number));
+ break;
case ISN_ECHOCONSOLE:
smsg("%s%4d ECHOCONSOLE %lld", pfx, current,
(varnumber_T)(iptr->isn_arg.number));