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:
Mitchell Hashimoto
2024-05-06 18:38:05 -07:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@ -932,6 +932,7 @@ pub fn updateFrame(
// success and reset while we hold the lock. This is much easier
// than coordinating row by row or as changes are persisted.
state.terminal.flags.dirty = .{};
state.terminal.screen.dirty = .{};
{
var it = state.terminal.screen.pages.pageIterator(
.right_down,

View File

@ -1344,9 +1344,11 @@ pub fn select(self: *Screen, sel_: ?Selection) !void {
/// Same as select(null) but can't fail.
pub fn clearSelection(self: *Screen) void {
if (self.selection) |*sel| sel.deinit(self);
self.selection = null;
if (self.selection) |*sel| {
sel.deinit(self);
self.dirty.selection = true;
}
self.selection = null;
}
pub const SelectionString = struct {