patch 8.2.1108: mouse left-right scroll is not supported in terminal window
Problem: Mouse left-right scroll is not supported in terminal window.
Solution: Implement mouse codes 6 and 7. (Trygve Aaberge, closes #6363)
diff --git a/src/terminal.c b/src/terminal.c
index 5424574..bd5fd41 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1389,8 +1389,8 @@
case K_MOUSEUP: other = term_send_mouse(vterm, 5, 1); break;
case K_MOUSEDOWN: other = term_send_mouse(vterm, 4, 1); break;
- case K_MOUSELEFT: /* TODO */ return 0;
- case K_MOUSERIGHT: /* TODO */ return 0;
+ case K_MOUSELEFT: other = term_send_mouse(vterm, 7, 1); break;
+ case K_MOUSERIGHT: other = term_send_mouse(vterm, 6, 1); break;
case K_LEFTMOUSE:
case K_LEFTMOUSE_NM:
@@ -2474,6 +2474,8 @@
restore_cursor = TRUE;
raw_c = term_vgetc();
+if (raw_c > 0)
+ ch_log(NULL, "terminal_loop() got %d", raw_c);
if (!term_use_loop_check(TRUE) || in_terminal_loop != curbuf->b_term)
{
// Job finished while waiting for a character. Push back the