mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00
Merge pull request #1730 from mitchellh/dirty
renderer/metal: reset screen dirty flag properly, be more careful setting selection dirty flag
This commit is contained in:
@ -932,6 +932,7 @@ pub fn updateFrame(
|
|||||||
// success and reset while we hold the lock. This is much easier
|
// success and reset while we hold the lock. This is much easier
|
||||||
// than coordinating row by row or as changes are persisted.
|
// than coordinating row by row or as changes are persisted.
|
||||||
state.terminal.flags.dirty = .{};
|
state.terminal.flags.dirty = .{};
|
||||||
|
state.terminal.screen.dirty = .{};
|
||||||
{
|
{
|
||||||
var it = state.terminal.screen.pages.pageIterator(
|
var it = state.terminal.screen.pages.pageIterator(
|
||||||
.right_down,
|
.right_down,
|
||||||
|
@ -1344,9 +1344,11 @@ pub fn select(self: *Screen, sel_: ?Selection) !void {
|
|||||||
|
|
||||||
/// Same as select(null) but can't fail.
|
/// Same as select(null) but can't fail.
|
||||||
pub fn clearSelection(self: *Screen) void {
|
pub fn clearSelection(self: *Screen) void {
|
||||||
if (self.selection) |*sel| sel.deinit(self);
|
if (self.selection) |*sel| {
|
||||||
|
sel.deinit(self);
|
||||||
|
self.dirty.selection = true;
|
||||||
|
}
|
||||||
self.selection = null;
|
self.selection = null;
|
||||||
self.dirty.selection = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const SelectionString = struct {
|
pub const SelectionString = struct {
|
||||||
|
Reference in New Issue
Block a user