]> granicus.if.org Git - vim/commitdiff
patch 8.2.4536: debugger test fails when breaking on expression v8.2.4536
authorBram Moolenaar <Bram@vim.org>
Thu, 10 Mar 2022 13:29:20 +0000 (13:29 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 10 Mar 2022 13:29:20 +0000 (13:29 +0000)
Problem:    Debugger test fails when breaking on expression.
Solution:   Compare strings with "==" instead of "is".

src/debugger.c
src/version.c

index 54bf6ba8725c37da49c91c1f1b7c46edc620e6c3..6c38e5a3d3a9c370aa4b20448103612b780d22db 100644 (file)
@@ -989,7 +989,12 @@ debuggy_find(
                }
                else
                {
-                   if (typval_compare(tv, bp->dbg_val, EXPR_IS, FALSE) == OK
+                   // Use "==" instead of "is" for strings, that is what we
+                   // always have done.
+                   exprtype_T  type = tv->v_type == VAR_STRING
+                                                       ? EXPR_EQUAL : EXPR_IS;
+
+                   if (typval_compare(tv, bp->dbg_val, type, FALSE) == OK
                            && tv->vval.v_number == FALSE)
                    {
                        typval_T *v;
index 49810ea00f72f7bc7c2592c1c544b9437351a90b..7856aedc8cee75541ceed29078cb1b09e211bf4e 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4536,
 /**/
     4535,
 /**/