mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
@@ -1744,6 +1744,7 @@ do_one_cmd(
|
|||||||
int did_set_expr_line = FALSE;
|
int did_set_expr_line = FALSE;
|
||||||
#endif
|
#endif
|
||||||
int sourcing = flags & DOCMD_VERBOSE;
|
int sourcing = flags & DOCMD_VERBOSE;
|
||||||
|
int did_append_cmd = FALSE;
|
||||||
|
|
||||||
CLEAR_FIELD(ea);
|
CLEAR_FIELD(ea);
|
||||||
ea.line1 = 1;
|
ea.line1 = 1;
|
||||||
@@ -2019,6 +2020,7 @@ do_one_cmd(
|
|||||||
append_command(after_modifier);
|
append_command(after_modifier);
|
||||||
else
|
else
|
||||||
append_command(*cmdlinep);
|
append_command(*cmdlinep);
|
||||||
|
did_append_cmd = TRUE;
|
||||||
}
|
}
|
||||||
errormsg = (char *)IObuff;
|
errormsg = (char *)IObuff;
|
||||||
did_emsg_syntax = TRUE;
|
did_emsg_syntax = TRUE;
|
||||||
@@ -2609,7 +2611,7 @@ doend:
|
|||||||
|
|
||||||
if (errormsg != NULL && *errormsg != NUL && !did_emsg)
|
if (errormsg != NULL && *errormsg != NUL && !did_emsg)
|
||||||
{
|
{
|
||||||
if (sourcing || !KeyTyped)
|
if ((sourcing || !KeyTyped) && !did_append_cmd)
|
||||||
{
|
{
|
||||||
if (errormsg != (char *)IObuff)
|
if (errormsg != (char *)IObuff)
|
||||||
{
|
{
|
||||||
|
@@ -734,6 +734,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
5093,
|
||||||
/**/
|
/**/
|
||||||
5092,
|
5092,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user