mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(screen): truncate when overwriting right half of a double-width char
Unlike the code above, this truncates the character in the same grid. This is mainly for the pum scrollbar in the next commit.
This commit is contained in:
parent
bc75544fac
commit
28dadd5a54
@ -5965,6 +5965,13 @@ void grid_puts_len(ScreenGrid *grid, char_u *text, int textlen, int row, int col
|
||||
clear_next_cell = true;
|
||||
}
|
||||
|
||||
// When at the start of the text and overwriting the right half of a
|
||||
// two-cell character in the same grid, truncate that into a '>'.
|
||||
if (ptr == text && col > 0 && grid->chars[off][0] == 0) {
|
||||
grid->chars[off - 1][0] = '>';
|
||||
grid->chars[off - 1][1] = 0;
|
||||
}
|
||||
|
||||
schar_copy(grid->chars[off], buf);
|
||||
grid->attrs[off] = attr;
|
||||
if (mbyte_cells == 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user