From 95b88d38c2aaa34c944c49857397feacf64ab3fb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 18 Aug 2023 08:45:24 -0700 Subject: [PATCH] mouse scroll events were flipped for non-cursor key events Fixes #302 --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index e9f766385..582c6cd71 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -1255,7 +1255,7 @@ pub fn scrollCallback( // a lock since we read terminal state. if (y.delta != 0) { const pos = try self.rt_surface.getCursorPos(); - try self.mouseReport(if (y.sign < 0) .five else .four, .press, self.mouse.mods, pos); + try self.mouseReport(if (y.delta < 0) .four else .five, .press, self.mouse.mods, pos); } if (x.delta != 0) { const pos = try self.rt_surface.getCursorPos();