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

patch 8.1.0326: screen dump does not consider NUL and space equal

Problem:    Screen dump does not consider NUL and space equal.
Solution:   Use temp variables instead of character from cell.
This commit is contained in:
Bram Moolenaar
2018-08-24 21:30:28 +02:00
parent 7c60505e10
commit 98fc8d7b6c
3 changed files with 13 additions and 11 deletions

View File

@@ -3939,9 +3939,9 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
c = (c == NUL) ? ' ' : c;
pc = (pc == NUL) ? ' ' : pc;
}
if (cell.chars[i] != prev_cell.chars[i])
if (c != pc)
same_chars = FALSE;
if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL)
if (c == NUL || pc == NUL)
break;
}
same_attr = vtermAttr2hl(cell.attrs)