mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
fix(excmd): append original command to error message
Revert the change to do_cmdline_cmd() from #5226. This function is used in many places, so making it different from Vim leads to small differences from Vim in the behavior of some functions like execute() and assert_fails(). If DOCMD_VERBOSE really needs to be removed somewhere, a do_cmdline() call without DOCMD_VERBOSE is also shorter than a do_cmdline() call with DOCMD_VERBOSE.
This commit is contained in:
@@ -288,7 +288,7 @@ static void msg_verbose_cmd(linenr_T lnum, char *cmd)
|
||||
/// Execute a simple command line. Used for translated commands like "*".
|
||||
int do_cmdline_cmd(const char *cmd)
|
||||
{
|
||||
return do_cmdline((char *)cmd, NULL, NULL, DOCMD_NOWAIT|DOCMD_KEYTYPED);
|
||||
return do_cmdline((char *)cmd, NULL, NULL, DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_KEYTYPED);
|
||||
}
|
||||
|
||||
/// do_cmdline(): execute one Ex command line
|
||||
@@ -1862,7 +1862,8 @@ static bool skip_cmd(const exarg_T *eap)
|
||||
|
||||
/// Execute one Ex command.
|
||||
///
|
||||
/// If 'sourcing' is true, the command will be included in the error message.
|
||||
/// If "flags" has DOCMD_VERBOSE, the command will be included in the error
|
||||
/// message.
|
||||
///
|
||||
/// 1. skip comment lines and leading space
|
||||
/// 2. handle command modifiers
|
||||
|
Reference in New Issue
Block a user