diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-23 22:10:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-23 22:10:34 +0100 |
commit | 47015b80a0b0ff74ba7cb597d5959604b6e9a511 (patch) | |
tree | 285a40074183263b83df9bdc08f8247220b53840 /src | |
parent | 948a796bfea55d1e5a3a079d4976fdd4d093cd05 (diff) |
patch 8.0.1632: in a terminal dump NUL and space are differentv8.0.1632
Problem: In a terminal dump NUL and space considered are different,
although they are displayed the same.
Solution: When encountering NUL handle it like space.
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index 18da710256..4f29b56699 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -3396,6 +3396,15 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED) for (i = 0; i < VTERM_MAX_CHARS_PER_CELL; ++i) { + int c = cell.chars[i]; + int pc = prev_cell.chars[i]; + + /* For the first character NUL is the same as space. */ + if (i == 0) + { + c = (c == NUL) ? ' ' : c; + pc = (pc == NUL) ? ' ' : pc; + } if (cell.chars[i] != prev_cell.chars[i]) same_chars = FALSE; if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL) diff --git a/src/version.c b/src/version.c index 473883c99a..6999611c0a 100644 --- a/src/version.c +++ b/src/version.c @@ -767,6 +767,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1632, +/**/ 1631, /**/ 1630, |