summaryrefslogtreecommitdiffstats
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-01 22:11:28 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-01 22:11:28 +0200
commitb836f631dba2534efd314a8f77439cebc75acd4e (patch)
tree6cde26a11e30c9b3b87a348e875f0cc86b0126cf /src/channel.c
parent11a632d60bde616feb298d180108819ebb1d04a0 (diff)
patch 8.2.3082: a channel command "echoerr" does not show anythingv8.2.3082
Problem: A channel command "echoerr" does not show anything. Solution: Do not use silent errors when using an "echoerr" command. (closes #8494)
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index 5d89413503..65757f1d7e 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2486,12 +2486,17 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
if (STRCMP(cmd, "ex") == 0)
{
- int called_emsg_before = called_emsg;
+ int called_emsg_before = called_emsg;
+ char_u *p = arg;
+ int do_emsg_silent;
ch_log(channel, "Executing ex command '%s'", (char *)arg);
- ++emsg_silent;
+ do_emsg_silent = !checkforcmd(&p, "echoerr", 5);
+ if (do_emsg_silent)
+ ++emsg_silent;
do_cmdline_cmd(arg);
- --emsg_silent;
+ if (do_emsg_silent)
+ --emsg_silent;
if (called_emsg > called_emsg_before)
ch_log(channel, "Ex command error: '%s'",
(char *)get_vim_var_str(VV_ERRMSG));