Mercurial > vim
diff src/terminal.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 | 9064044fd4f6 |
children | ba2c3f38a596 |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -1389,8 +1389,8 @@ term_convert_key(term_T *term, int c, in 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 @@ terminal_loop(int blocking) 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