mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +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.
|
/// 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