mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
terminal: only set selection dirty to true on clear if previously set
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user