0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2638: cannot write a message to the terminal from the GUI

Problem:    Cannot write a message to the terminal from the GUI.
Solution:   Add :echoconsole and use it in the test runner. (issue #7975)
This commit is contained in:
Bram Moolenaar
2021-03-22 16:19:45 +01:00
parent 09f8b3a022
commit 4c86830fc5
9 changed files with 54 additions and 32 deletions

View File

@@ -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;