comparison src/terminal.c @ 14625:cd3f0987c0bc v8.1.0326

patch 8.1.0326: screen dump does not consider NUL and space equal commit https://github.com/vim/vim/commit/98fc8d7b6c8cc3c2f55e8d08617ecc27a3624899 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 24 21:30:28 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Fri, 24 Aug 2018 21:45:05 +0200
parents ecf6c05d8ac3
children e2497d9c51c4
comparison
equal deleted inserted replaced
14624:8d62c2813fac 14625:cd3f0987c0bc
3937 if (i == 0) 3937 if (i == 0)
3938 { 3938 {
3939 c = (c == NUL) ? ' ' : c; 3939 c = (c == NUL) ? ' ' : c;
3940 pc = (pc == NUL) ? ' ' : pc; 3940 pc = (pc == NUL) ? ' ' : pc;
3941 } 3941 }
3942 if (cell.chars[i] != prev_cell.chars[i]) 3942 if (c != pc)
3943 same_chars = FALSE; 3943 same_chars = FALSE;
3944 if (cell.chars[i] == NUL || prev_cell.chars[i] == NUL) 3944 if (c == NUL || pc == NUL)
3945 break; 3945 break;
3946 } 3946 }
3947 same_attr = vtermAttr2hl(cell.attrs) 3947 same_attr = vtermAttr2hl(cell.attrs)
3948 == vtermAttr2hl(prev_cell.attrs) 3948 == vtermAttr2hl(prev_cell.attrs)
3949 && same_color(&cell.fg, &prev_cell.fg) 3949 && same_color(&cell.fg, &prev_cell.fg)