mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
some comments, make switch exaustive
This commit is contained in:
@ -1121,6 +1121,9 @@ pub fn keyCallback(
|
|||||||
self.hideMouse();
|
self.hideMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When we are in the middle of a mouse event and we press shift,
|
||||||
|
// we change the mouse to a text shape so that selection appears
|
||||||
|
// possible.
|
||||||
if (self.io.terminal.flags.mouse_event != .none and
|
if (self.io.terminal.flags.mouse_event != .none and
|
||||||
event.physical_key == .left_shift or
|
event.physical_key == .left_shift or
|
||||||
event.physical_key == .right_shift)
|
event.physical_key == .right_shift)
|
||||||
@ -1128,7 +1131,7 @@ pub fn keyCallback(
|
|||||||
switch (event.action) {
|
switch (event.action) {
|
||||||
.press => try self.rt_surface.setMouseShape(.text),
|
.press => try self.rt_surface.setMouseShape(.text),
|
||||||
.release => try self.rt_surface.setMouseShape(self.io.terminal.mouse_shape),
|
.release => try self.rt_surface.setMouseShape(self.io.terminal.mouse_shape),
|
||||||
else => {},
|
.repeat => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ previous_char: ?u21 = null,
|
|||||||
/// The modes that this terminal currently has active.
|
/// The modes that this terminal currently has active.
|
||||||
modes: modes.ModeState = .{},
|
modes: modes.ModeState = .{},
|
||||||
|
|
||||||
|
/// The most recently set mouse shape for the terminal.
|
||||||
mouse_shape: mouse_shape.MouseShape = .text,
|
mouse_shape: mouse_shape.MouseShape = .text,
|
||||||
|
|
||||||
/// These are just a packed set of flags we may set on the terminal.
|
/// These are just a packed set of flags we may set on the terminal.
|
||||||
|
Reference in New Issue
Block a user