Skip to content

Commit

Permalink
patch 8.0.1632: in a terminal dump NUL and space are different
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brammool committed Mar 23, 2018
1 parent 948a796 commit 47015b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/terminal.c
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -766,6 +766,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1632,
/**/
1631,
/**/
Expand Down

0 comments on commit 47015b8

Please sign in to comment.