mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-20 12:01:34 +00:00
website
This commit is contained in:
@@ -1519,7 +1519,11 @@ fn mouseShiftCapture(self: *const Surface, lock: bool) bool {
|
||||
|
||||
// If thet terminal explicitly requests it then we always allow it
|
||||
// since we processed never/always at this point.
|
||||
if (self.io.terminal.flags.mouse_shift_capture) return true;
|
||||
switch (self.io.terminal.flags.mouse_shift_capture) {
|
||||
.false => return false,
|
||||
.true => return true,
|
||||
.null => {},
|
||||
}
|
||||
|
||||
// Otherwise, go with the user's preference
|
||||
return switch (self.config.mouse_shift_capture) {
|
||||
|
||||
@@ -106,7 +106,7 @@ flags: packed struct {
|
||||
/// Set via the XTSHIFTESCAPE sequence. If true (XTSHIFTESCAPE = 1)
|
||||
/// then we want to capture the shift key for the mouse protocol
|
||||
/// if the configuration allows it.
|
||||
mouse_shift_capture: bool = false,
|
||||
mouse_shift_capture: enum { null, false, true } = .null,
|
||||
} = .{},
|
||||
|
||||
/// The event types that can be reported for mouse-related activities.
|
||||
|
||||
@@ -1522,7 +1522,7 @@ const StreamHandler = struct {
|
||||
}
|
||||
|
||||
pub fn setMouseShiftCapture(self: *StreamHandler, v: bool) !void {
|
||||
self.terminal.flags.mouse_shift_capture = v;
|
||||
self.terminal.flags.mouse_shift_capture = if (v) .true else .false;
|
||||
}
|
||||
|
||||
pub fn setAttribute(self: *StreamHandler, attr: terminal.Attribute) !void {
|
||||
|
||||
Reference in New Issue
Block a user