fix(terminal): forward horizontal mouse scrolling (#24552)

This commit is contained in:
zeertzjq
2023-08-04 10:24:27 +08:00
committed by GitHub
parent 0a7fda6fa0
commit 21d466c1b9
3 changed files with 218 additions and 65 deletions

View File

@@ -577,6 +577,8 @@ static int terminal_execute(VimState *state, int key)
case K_RIGHTRELEASE:
case K_MOUSEDOWN:
case K_MOUSEUP:
case K_MOUSELEFT:
case K_MOUSERIGHT:
if (send_mouse_event(s->term, key)) {
return 0;
}
@@ -1440,6 +1442,10 @@ static bool send_mouse_event(Terminal *term, int c)
pressed = true; button = 4; break;
case K_MOUSEUP:
pressed = true; button = 5; break;
case K_MOUSELEFT:
pressed = true; button = 7; break;
case K_MOUSERIGHT:
pressed = true; button = 6; break;
default:
return false;
}