Mercurial > vim
diff src/ex_docmd.c @ 29146:72108041757c v8.2.5093
patch 8.2.5093: error message for unknown command may have the command twice
Commit: https://github.com/vim/vim/commit/6ce1b59228b94f4a5b076af75b091e14483c1392
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 14 16:06:07 2022 +0100
patch 8.2.5093: error message for unknown command may have the command twice
Problem: Error message for unknown command may mention the command twice.
(Malcolm Rowe)
Solution: Add the did_append_cmd flag. (closes #10570)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Jun 2022 17:15:02 +0200 |
parents | dee6b7c32f2c |
children | 9e0b45df95b0 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -1744,6 +1744,7 @@ do_one_cmd( int did_set_expr_line = FALSE; #endif int sourcing = flags & DOCMD_VERBOSE; + int did_append_cmd = FALSE; CLEAR_FIELD(ea); ea.line1 = 1; @@ -2019,6 +2020,7 @@ do_one_cmd( append_command(after_modifier); else append_command(*cmdlinep); + did_append_cmd = TRUE; } errormsg = (char *)IObuff; did_emsg_syntax = TRUE; @@ -2609,7 +2611,7 @@ doend: if (errormsg != NULL && *errormsg != NUL && !did_emsg) { - if (sourcing || !KeyTyped) + if ((sourcing || !KeyTyped) && !did_append_cmd) { if (errormsg != (char *)IObuff) {