comparison src/channel.c @ 25090:73503bafb3bf v8.2.3082

patch 8.2.3082: a channel command "echoerr" does not show anything Commit: https://github.com/vim/vim/commit/b836f631dba2534efd314a8f77439cebc75acd4e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 1 22:11:28 2021 +0200 patch 8.2.3082: a channel command "echoerr" does not show anything Problem: A channel command "echoerr" does not show anything. Solution: Do not use silent errors when using an "echoerr" command. (closes #8494)
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Jul 2021 22:15:04 +0200
parents 5f6a70167daa
children eafc0e07b188
comparison
equal deleted inserted replaced
25089:80739b453fd4 25090:73503bafb3bf
2484 if (arg == NULL) 2484 if (arg == NULL)
2485 arg = (char_u *)""; 2485 arg = (char_u *)"";
2486 2486
2487 if (STRCMP(cmd, "ex") == 0) 2487 if (STRCMP(cmd, "ex") == 0)
2488 { 2488 {
2489 int called_emsg_before = called_emsg; 2489 int called_emsg_before = called_emsg;
2490 char_u *p = arg;
2491 int do_emsg_silent;
2490 2492
2491 ch_log(channel, "Executing ex command '%s'", (char *)arg); 2493 ch_log(channel, "Executing ex command '%s'", (char *)arg);
2492 ++emsg_silent; 2494 do_emsg_silent = !checkforcmd(&p, "echoerr", 5);
2495 if (do_emsg_silent)
2496 ++emsg_silent;
2493 do_cmdline_cmd(arg); 2497 do_cmdline_cmd(arg);
2494 --emsg_silent; 2498 if (do_emsg_silent)
2499 --emsg_silent;
2495 if (called_emsg > called_emsg_before) 2500 if (called_emsg > called_emsg_before)
2496 ch_log(channel, "Ex command error: '%s'", 2501 ch_log(channel, "Ex command error: '%s'",
2497 (char *)get_vim_var_str(VV_ERRMSG)); 2502 (char *)get_vim_var_str(VV_ERRMSG));
2498 } 2503 }
2499 else if (STRCMP(cmd, "normal") == 0) 2504 else if (STRCMP(cmd, "normal") == 0)