Skip to content

Commit 47015b8

Browse files
committed
patch 8.0.1632: in a terminal dump NUL and space are different
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.
1 parent 948a796 commit 47015b8

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/terminal.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3396,6 +3396,15 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
33963396

33973397
for (i = 0; i < VTERM_MAX_CHARS_PER_CELL; ++i)
33983398
{
3399+
int c = cell.chars[i];
3400+
int pc = prev_cell.chars[i];
3401+
3402+
/* For the first character NUL is the same as space. */
3403+
if (i == 0)
3404+
{
3405+
c = (c == NUL) ? ' ' : c;
3406+
pc = (pc == NUL) ? ' ' : pc;
3407+
}
33993408
if (cell.chars[i] != prev_cell.chars[i])
34003409
same_chars = FALSE;
34013410
if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ static char *(features[]) =
766766

767767
static int included_patches[] =
768768
{ /* Add new patch number below this line */
769+
/**/
770+
1632,
769771
/**/
770772
1631,
771773
/**/

0 commit comments

Comments
 (0)