Merge pull request #304 from mitchellh/mouse-scroll

mouse scroll events were flipped for non-cursor key events
This commit is contained in:
Mitchell Hashimoto
2023-08-18 09:10:09 -07:00
committed by GitHub

View File

@ -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();