Skip to content

Commit d615a31

Browse files
erraelchrisbra
authored andcommitted
patch 9.0.1989: Vim9: double error message given
Problem: Vim9: double error message given Solution: Only give second error message, if ther wasn't one given before closes: #13278 Signed-off-by: Christian Brabandt <[email protected]> Co-authored-by: Ernie Rael <[email protected]>
1 parent d2f4800 commit d615a31

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1989,
707709
/**/
708710
1988,
709711
/**/

src/vim9class.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2221,6 +2221,7 @@ class_object_index(
22212221
return FAIL;
22222222
size_t len = name_end - name;
22232223

2224+
int did_emsg_save = did_emsg;
22242225
class_T *cl;
22252226
if (rettv->v_type == VAR_CLASS)
22262227
cl = rettv->vval.v_class;
@@ -2310,7 +2311,8 @@ class_object_index(
23102311
return OK;
23112312
}
23122313

2313-
member_not_found_msg(cl, VAR_OBJECT, name, len);
2314+
if (did_emsg == did_emsg_save)
2315+
member_not_found_msg(cl, VAR_OBJECT, name, len);
23142316
}
23152317

23162318
else if (rettv->v_type == VAR_CLASS)

0 commit comments

Comments
 (0)