Merge pull request #512 from mitchellh/mouse-report

core: send proper reporting code for alt not super
This commit is contained in:
Mitchell Hashimoto
2023-09-21 08:59:14 -07:00
committed by GitHub

View File

@ -1296,7 +1296,7 @@ fn mouseReport(
// X10 doesn't have modifiers // X10 doesn't have modifiers
if (self.io.terminal.flags.mouse_event != .x10) { if (self.io.terminal.flags.mouse_event != .x10) {
if (mods.shift) acc += 4; if (mods.shift) acc += 4;
if (mods.super) acc += 8; if (mods.alt) acc += 8;
if (mods.ctrl) acc += 16; if (mods.ctrl) acc += 16;
} }
@ -1469,10 +1469,7 @@ pub fn mouseButtonCallback(
{ {
self.renderer_state.mutex.lock(); self.renderer_state.mutex.lock();
defer self.renderer_state.mutex.unlock(); defer self.renderer_state.mutex.unlock();
if (self.io.terminal.flags.mouse_event != .none) report: { if (self.io.terminal.flags.mouse_event != .none) {
// Shift overrides mouse "grabbing" in the window, taken from Kitty.
if (mods.shift) break :report;
// In any other mouse button scenario without shift pressed we // In any other mouse button scenario without shift pressed we
// clear the selection since the underlying application can handle // clear the selection since the underlying application can handle
// that in any way (i.e. "scrolling"). // that in any way (i.e. "scrolling").