0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2435: setline() gives an error for some types

Problem:    setline() gives an error for some types.
Solution:   Allow any type, convert each item to a string.
This commit is contained in:
Bram Moolenaar
2021-01-31 13:08:38 +01:00
parent f2b26bcf8f
commit 3445320839
9 changed files with 96 additions and 20 deletions

View File

@@ -940,9 +940,9 @@ debuggy_find(
{
if (bp->dbg_val == NULL)
{
debug_oldval = typval_tostring(NULL);
debug_oldval = typval_tostring(NULL, TRUE);
bp->dbg_val = tv;
debug_newval = typval_tostring(bp->dbg_val);
debug_newval = typval_tostring(bp->dbg_val, TRUE);
line = TRUE;
}
else
@@ -953,11 +953,11 @@ debuggy_find(
typval_T *v;
line = TRUE;
debug_oldval = typval_tostring(bp->dbg_val);
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
// Need to evaluate again, typval_compare() overwrites
// "tv".
v = eval_expr(bp->dbg_name, NULL);
debug_newval = typval_tostring(v);
debug_newval = typval_tostring(v, TRUE);
free_tv(bp->dbg_val);
bp->dbg_val = v;
}
@@ -966,8 +966,8 @@ debuggy_find(
}
else if (bp->dbg_val != NULL)
{
debug_oldval = typval_tostring(bp->dbg_val);
debug_newval = typval_tostring(NULL);
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
debug_newval = typval_tostring(NULL, TRUE);
free_tv(bp->dbg_val);
bp->dbg_val = NULL;
line = TRUE;