summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-22 16:19:45 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-22 16:19:45 +0100
commit4c86830fc578bcb47a51cf0983da5388cdbfe6cc (patch)
tree8c2b04a8cfaf7e00f8a20e38a5e5d09a5043b951 /src/eval.c
parent09f8b3a02200a1900a8bb41d7436f9d17ebd2d1b (diff)
downloadvim-git-4c86830fc578bcb47a51cf0983da5388cdbfe6cc.tar.gz
patch 8.2.2638: cannot write a message to the terminal from the GUIv8.2.2638
Problem: Cannot write a message to the terminal from the GUI. Solution: Add :echoconsole and use it in the test runner. (issue #7975)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 6cdc10f68..95dd5e2e6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6117,6 +6117,7 @@ get_echo_attr(void)
* ":execute expr1 ..." execute the result of an expression.
* ":echomsg expr1 ..." Print a message
* ":echoerr expr1 ..." Print an error
+ * ":echoconsole expr1 ..." Print a message on stdout
* Each gets spaces around each argument and a newline at the end for
* echo commands
*/
@@ -6194,6 +6195,11 @@ ex_execute(exarg_T *eap)
msg_attr(ga.ga_data, echo_attr);
out_flush();
}
+ else if (eap->cmdidx == CMD_echoconsole)
+ {
+ ui_write(ga.ga_data, (int)STRLEN(ga.ga_data), TRUE);
+ ui_write((char_u *)"\r\n", 2, TRUE);
+ }
else if (eap->cmdidx == CMD_echoerr)
{
int save_did_emsg = did_emsg;