mouse scroll events were flipped for non-cursor key events

Fixes #302
This commit is contained in:
Mitchell Hashimoto
2023-08-18 08:45:24 -07:00
parent e8a6d09297
commit 95b88d38c2

View File

@ -1255,7 +1255,7 @@ pub fn scrollCallback(
// a lock since we read terminal state. // a lock since we read terminal state.
if (y.delta != 0) { if (y.delta != 0) {
const pos = try self.rt_surface.getCursorPos(); 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) { if (x.delta != 0) {
const pos = try self.rt_surface.getCursorPos(); const pos = try self.rt_surface.getCursorPos();