Mercurial > vim
comparison src/getchar.c @ 21230:e67123c115d2 v8.2.1166
patch 8.2.1166: once mouse move events are enabled getchar() returns them
Commit: https://github.com/vim/vim/commit/ae97b94176062d30ea8c68bb83cde034c5150c78
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 9 19:16:35 2020 +0200
patch 8.2.1166: once mouse move events are enabled getchar() returns them
Problem: Once mouse move events are enabled getchar() returns them.
Solution: Ignore K_MOUSEMOVE in getchar(). (closes https://github.com/vim/vim/issues/6424)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Jul 2020 19:30:04 +0200 |
parents | e76b83c07bd8 |
children | bb0c4325a712 |
comparison
equal
deleted
inserted
replaced
21229:c383383768f4 | 21230:e67123c115d2 |
---|---|
1499 oldcurscript = curscript; | 1499 oldcurscript = curscript; |
1500 do | 1500 do |
1501 { | 1501 { |
1502 update_topline_cursor(); // update cursor position and topline | 1502 update_topline_cursor(); // update cursor position and topline |
1503 normal_cmd(&oa, FALSE); // execute one command | 1503 normal_cmd(&oa, FALSE); // execute one command |
1504 vpeekc(); // check for end of file | 1504 (void)vpeekc(); // check for end of file |
1505 } | 1505 } |
1506 while (scriptin[oldcurscript] != NULL); | 1506 while (scriptin[oldcurscript] != NULL); |
1507 | 1507 |
1508 State = save_State; | 1508 State = save_State; |
1509 msg_scroll = save_msg_scroll; | 1509 msg_scroll = save_msg_scroll; |
2043 n = 0; | 2043 n = 0; |
2044 else | 2044 else |
2045 // getchar(0) and char avail: return char | 2045 // getchar(0) and char avail: return char |
2046 n = plain_vgetc(); | 2046 n = plain_vgetc(); |
2047 | 2047 |
2048 if (n == K_IGNORE) | 2048 if (n == K_IGNORE || n == K_MOUSEMOVE) |
2049 continue; | 2049 continue; |
2050 break; | 2050 break; |
2051 } | 2051 } |
2052 --no_mapping; | 2052 --no_mapping; |
2053 --allow_keys; | 2053 --allow_keys; |