mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: resize should preserve cursor style ref
This commit is contained in:
@ -845,6 +845,11 @@ fn resizeInternal(
|
|||||||
// No matter what we mark our image state as dirty
|
// No matter what we mark our image state as dirty
|
||||||
self.kitty_images.dirty = true;
|
self.kitty_images.dirty = true;
|
||||||
|
|
||||||
|
// We store our style so that we can update it later.
|
||||||
|
const old_style = self.cursor.style;
|
||||||
|
self.cursor.style = .{};
|
||||||
|
try self.manualStyleUpdate();
|
||||||
|
|
||||||
// Perform the resize operation. This will update cursor by reference.
|
// Perform the resize operation. This will update cursor by reference.
|
||||||
try self.pages.resize(.{
|
try self.pages.resize(.{
|
||||||
.rows = rows,
|
.rows = rows,
|
||||||
@ -863,6 +868,11 @@ fn resizeInternal(
|
|||||||
// If our cursor was updated, we do a full reload so all our cursor
|
// If our cursor was updated, we do a full reload so all our cursor
|
||||||
// state is correct.
|
// state is correct.
|
||||||
self.cursorReload();
|
self.cursorReload();
|
||||||
|
|
||||||
|
// Restore our previous pen. Since the page may have changed we
|
||||||
|
// reset this here so we can setup our ref.
|
||||||
|
self.cursor.style = old_style;
|
||||||
|
try self.manualStyleUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set a style attribute for the current cursor.
|
/// Set a style attribute for the current cursor.
|
||||||
|
Reference in New Issue
Block a user