renderer: split ligature around cursor even if cursor is flashing

Fixes #356
This commit is contained in:
Mitchell Hashimoto
2023-08-29 13:44:40 -07:00
parent 2ad9f76749
commit ae0de7bce4
2 changed files with 12 additions and 2 deletions

View File

@ -1148,6 +1148,11 @@ fn rebuildCells(
screen.viewportIsBottom() and
y == screen.cursor.y;
// True if we want to do font shaping around the cursor. We want to
// do font shaping as long as the cursor is enabled.
const shape_cursor = screen.viewportIsBottom() and
y == screen.cursor.y;
// If this is the row with our cursor, then we may have to modify
// the cell with the cursor.
const start_i: usize = self.cells.items.len;
@ -1183,7 +1188,7 @@ fn rebuildCells(
self.font_group,
row,
row_selection,
if (cursor_row) screen.cursor.x else null,
if (shape_cursor) screen.cursor.x else null,
);
while (try iter.next(self.alloc)) |run| {
for (try self.font_shaper.shape(run)) |shaper_cell| {

View File

@ -902,6 +902,11 @@ pub fn rebuildCells(
screen.viewportIsBottom() and
y == screen.cursor.y;
// True if we want to do font shaping around the cursor. We want to
// do font shaping as long as the cursor is enabled.
const shape_cursor = screen.viewportIsBottom() and
y == screen.cursor.y;
// If this is the row with our cursor, then we may have to modify
// the cell with the cursor.
const start_i: usize = self.cells.items.len;
@ -940,7 +945,7 @@ pub fn rebuildCells(
self.font_group,
row,
selection,
if (cursor_row) screen.cursor.x else null,
if (shape_cursor) screen.cursor.x else null,
);
while (try iter.next(self.alloc)) |run| {
for (try self.font_shaper.shape(run)) |shaper_cell| {