mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
TUI: handle wrap of doublewidth chars correctly
This commit is contained in:
@@ -1276,9 +1276,10 @@ static void tui_raw_line(UI *ui, Integer g, Integer linerow, Integer startcol,
|
|||||||
// width and the line continuation is within the grid.
|
// width and the line continuation is within the grid.
|
||||||
|
|
||||||
if (endcol != grid->width) {
|
if (endcol != grid->width) {
|
||||||
// Print the last cell of the row, if we haven't already done so.
|
// Print the last char of the row, if we haven't already done so.
|
||||||
cursor_goto(ui, (int)linerow, grid->width - 1);
|
int size = grid->cells[linerow][grid->width - 1].data[0] == NUL ? 2 : 1;
|
||||||
print_cell(ui, &grid->cells[linerow][grid->width - 1]);
|
cursor_goto(ui, (int)linerow, grid->width - size);
|
||||||
|
print_cell(ui, &grid->cells[linerow][grid->width - size]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrap the cursor over to the next line. The next line will be
|
// Wrap the cursor over to the next line. The next line will be
|
||||||
|
Reference in New Issue
Block a user