Mercurial > vim
comparison src/debugger.c @ 28023:146817021fc3 v8.2.4536
patch 8.2.4536: debugger test fails when breaking on expression
Commit: https://github.com/vim/vim/commit/cf6662082f89de3458c69c4390055ab99aa7dd22
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 10 13:29:20 2022 +0000
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".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 10 Mar 2022 14:30:03 +0100 |
parents | bce848ec8b1b |
children | d770568e6c98 |
comparison
equal
deleted
inserted
replaced
28022:48e44a36c25c | 28023:146817021fc3 |
---|---|
987 debug_newval = typval_tostring(bp->dbg_val, TRUE); | 987 debug_newval = typval_tostring(bp->dbg_val, TRUE); |
988 line = TRUE; | 988 line = TRUE; |
989 } | 989 } |
990 else | 990 else |
991 { | 991 { |
992 if (typval_compare(tv, bp->dbg_val, EXPR_IS, FALSE) == OK | 992 // Use "==" instead of "is" for strings, that is what we |
993 // always have done. | |
994 exprtype_T type = tv->v_type == VAR_STRING | |
995 ? EXPR_EQUAL : EXPR_IS; | |
996 | |
997 if (typval_compare(tv, bp->dbg_val, type, FALSE) == OK | |
993 && tv->vval.v_number == FALSE) | 998 && tv->vval.v_number == FALSE) |
994 { | 999 { |
995 typval_T *v; | 1000 typval_T *v; |
996 | 1001 |
997 line = TRUE; | 1002 line = TRUE; |