mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
renderer/opengl: invert cursor cell text when glyph is constrained
Fixes #1867
This commit is contained in:
@ -1006,7 +1006,9 @@ pub fn rebuildCells(
|
|||||||
const x = screen.cursor.x - @intFromBool(screen_cell.wide == .spacer_tail);
|
const x = screen.cursor.x - @intFromBool(screen_cell.wide == .spacer_tail);
|
||||||
for (self.cells.items[start_i..]) |cell| {
|
for (self.cells.items[start_i..]) |cell| {
|
||||||
if (cell.grid_col == x and
|
if (cell.grid_col == x and
|
||||||
(cell.mode == .fg or cell.mode == .fg_color))
|
(cell.mode == .fg or
|
||||||
|
cell.mode == .fg_color or
|
||||||
|
cell.mode == .fg_constrained))
|
||||||
{
|
{
|
||||||
cursor_cell = cell;
|
cursor_cell = cell;
|
||||||
break;
|
break;
|
||||||
@ -1113,7 +1115,7 @@ pub fn rebuildCells(
|
|||||||
|
|
||||||
_ = try self.addCursor(screen, cursor_style);
|
_ = try self.addCursor(screen, cursor_style);
|
||||||
if (cursor_cell) |*cell| {
|
if (cursor_cell) |*cell| {
|
||||||
if (cell.mode == .fg) {
|
if (cell.mode == .fg or cell.mode == .fg_constrained) {
|
||||||
if (self.config.cursor_text) |txt| {
|
if (self.config.cursor_text) |txt| {
|
||||||
cell.r = txt.r;
|
cell.r = txt.r;
|
||||||
cell.g = txt.g;
|
cell.g = txt.g;
|
||||||
|
Reference in New Issue
Block a user