From cf6662082f89de3458c69c4390055ab99aa7dd22 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 10 Mar 2022 13:29:20 +0000 Subject: patch 8.2.4536: debugger test fails when breaking on expression Problem: Debugger test fails when breaking on expression. Solution: Compare strings with "==" instead of "is". --- src/debugger.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/debugger.c') diff --git a/src/debugger.c b/src/debugger.c index 54bf6ba872..6c38e5a3d3 100644 --- a/src/debugger.c +++ b/src/debugger.c @@ -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; -- cgit v1.2.3