mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
vim-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.
3445320839
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -808,26 +808,26 @@ static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T
|
||||
typval_T *const tv = eval_expr_no_emsg(bp);
|
||||
if (tv != NULL) {
|
||||
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 {
|
||||
if (typval_compare(tv, bp->dbg_val, EXPR_IS, false) == OK
|
||||
&& tv->vval.v_number == false) {
|
||||
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".
|
||||
typval_T *const v = eval_expr_no_emsg(bp);
|
||||
debug_newval = typval_tostring(v);
|
||||
debug_newval = typval_tostring(v, true);
|
||||
tv_free(bp->dbg_val);
|
||||
bp->dbg_val = v;
|
||||
}
|
||||
tv_free(tv);
|
||||
}
|
||||
} 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);
|
||||
tv_free(bp->dbg_val);
|
||||
bp->dbg_val = NULL;
|
||||
line = true;
|
||||
|
Reference in New Issue
Block a user