From d6b827cce7f7b6300781e2040327379025a152bc Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 17 Sep 2023 10:24:51 -0700 Subject: [PATCH] core: all SGR mouse report modes can tell button differences Fixes #478 --- src/Surface.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index 707e69104..b0c2d3c51 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1325,7 +1325,10 @@ fn mouseReport( if (button == null) { // Null button means motion without a button pressed acc = 3; - } else if (action == .release and self.io.terminal.flags.mouse_format != .sgr) { + } else if (action == .release and + self.io.terminal.flags.mouse_format != .sgr and + self.io.terminal.flags.mouse_format != .sgr_pixels) + { // Release is 3. It is NOT 3 in SGR mode because SGR can tell // the application what button was released. acc = 3;