1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-07-01 15:49:29 +02:00
parent ef8c617b9c
commit d58d4f90ae
6 changed files with 89 additions and 22 deletions

View File

@@ -1389,8 +1389,8 @@ term_convert_key(term_T *term, int c, int modmask, char *buf)
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