]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1989: Vim9: double error message given v9.0.1989
authorErnie Rael <errael@raelity.com>
Thu, 5 Oct 2023 18:28:16 +0000 (20:28 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 5 Oct 2023 18:28:16 +0000 (20:28 +0200)
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 <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
src/version.c
src/vim9class.c

index 02dd9bfe47eafb33655105afc19a58214a47b7f3..64c68d99dc45cd94ee85030a8721f5cd1844d6ae 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1989,
 /**/
     1988,
 /**/
index 925149e66932a748e8846e84fb2853b7d9cbb573..295716e18e81416cd5bb9a6333e0ddf2e68e8b30 100644 (file)
@@ -2221,6 +2221,7 @@ class_object_index(
        return FAIL;
     size_t len = name_end - name;
 
+    int did_emsg_save = did_emsg;
     class_T *cl;
     if (rettv->v_type == VAR_CLASS)
        cl = rettv->vval.v_class;
@@ -2310,7 +2311,8 @@ class_object_index(
            return OK;
        }
 
-       member_not_found_msg(cl, VAR_OBJECT, name, len);
+       if (did_emsg == did_emsg_save)
+           member_not_found_msg(cl, VAR_OBJECT, name, len);
     }
 
     else if (rettv->v_type == VAR_CLASS)