comparison 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
comparison
equal deleted inserted replaced
21113:e0f65780cc0a 21114:d0265fdadec9
81 state->mouse_buttons |= (1 << (button-1)); 81 state->mouse_buttons |= (1 << (button-1));
82 else 82 else
83 state->mouse_buttons &= ~(1 << (button-1)); 83 state->mouse_buttons &= ~(1 << (button-1));
84 } 84 }
85 85
86 /* Most of the time we don't get button releases from 4/5 */ 86 /* Most of the time we don't get button releases from 4/5/6/7 */
87 if(state->mouse_buttons == old_buttons && button < 4) 87 if(state->mouse_buttons == old_buttons && button < 4)
88 return; 88 return;
89 if (!(state->mouse_flags & MOUSE_WANT_CLICK)) 89 if (!(state->mouse_flags & MOUSE_WANT_CLICK))
90 return; 90 return;
91 91
92 if(button < 4) { 92 if(button < 4) {
93 output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row); 93 output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row);
94 } 94 }
95 else if(button < 6) { 95 else if(button < 8) {
96 output_mouse(state, button-4 + 0x40, pressed, mod, state->mouse_col, state->mouse_row); 96 output_mouse(state, button-4 + 0x40, pressed, mod, state->mouse_col, state->mouse_row);
97 } 97 }
98 } 98 }