mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
screen: avoid artifacts
Put back the condition that was accidentally removed in
d42f934bcb
- if (enc_utf8 && ScreenLinesUC[off] != 0)
- bytes[utfc_char2bytes(off, bytes)] = NUL;
- else if (enc_dbcs == DBCS_JPNU && ScreenLines[off] == 0x8e) {
- bytes[0] = ScreenLines[off];
- bytes[1] = ScreenLines2[off];
- bytes[2] = NUL;
- } else if (enc_dbcs && MB_BYTE2LEN(bytes[0]) > 1) {
- bytes[1] = ScreenLines[off + 1];
- bytes[2] = NUL;
- }
+ bytes[utfc_char2bytes(off, bytes)] = NUL;
Fixes #8357
This commit is contained in:
@@ -5307,7 +5307,9 @@ void screen_getbytes(int row, int col, char_u *bytes, int *attrp)
|
||||
bytes[0] = ScreenLines[off];
|
||||
bytes[1] = NUL;
|
||||
|
||||
bytes[utfc_char2bytes(off, bytes)] = NUL;
|
||||
if (ScreenLinesUC[off] != 0) {
|
||||
bytes[utfc_char2bytes(off, bytes)] = NUL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user