diff src/libvterm/src/mouse.c @ 21114:d0265fdadec9 v8.2.1108

patch 8.2.1108: mouse left-right scroll is not supported in terminal window Commit: https://github.com/vim/vim/commit/d58d4f90aeb381045000ea46493b5bd9b9d1fa23 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 1 15:49:29 2020 +0200 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 https://github.com/vim/vim/issues/6363)
author Bram Moolenaar <Bram@vim.org>
date Wed, 01 Jul 2020 16:00:05 +0200
parents a4652d7ec99f
children f93337ae0612
line wrap: on
line diff
--- a/src/libvterm/src/mouse.c
+++ b/src/libvterm/src/mouse.c
@@ -83,7 +83,7 @@ void vterm_mouse_button(VTerm *vt, int b
       state->mouse_buttons &= ~(1 << (button-1));
   }
 
-  /* Most of the time we don't get button releases from 4/5 */
+  /* Most of the time we don't get button releases from 4/5/6/7 */
   if(state->mouse_buttons == old_buttons && button < 4)
     return;
   if (!(state->mouse_flags & MOUSE_WANT_CLICK))
@@ -92,7 +92,7 @@ void vterm_mouse_button(VTerm *vt, int b
   if(button < 4) {
     output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row);
   }
-  else if(button < 6) {
+  else if(button < 8) {
     output_mouse(state, button-4 + 0x40, pressed, mod, state->mouse_col, state->mouse_row);
   }
 }