Mercurial > vim
comparison src/testdir/test_functions.vim @ 27802:9b01fea87065 v8.2.4427
patch 8.2.4427: getchar() may return modifiers if no character is available
Commit: https://github.com/vim/vim/commit/ad6c45f62558e03d3e3a927b3fe4dbaf30a36bef
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Feb 20 19:05:10 2022 +0000
patch 8.2.4427: getchar() may return modifiers if no character is available
Problem: getchar() may return modifiers if no character is available.
Solution: Do not process modifiers when there is no character. (closes https://github.com/vim/vim/issues/9806)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Feb 2022 20:15:03 +0100 |
parents | 19367412787c |
children | 050d49de7a66 |
comparison
equal
deleted
inserted
replaced
27801:db4fb9a86f79 | 27802:9b01fea87065 |
---|---|
1816 call feedkeys('a', '') | 1816 call feedkeys('a', '') |
1817 call assert_equal('a', getcharstr()) | 1817 call assert_equal('a', getcharstr()) |
1818 call assert_equal('', getcharstr(0)) | 1818 call assert_equal('', getcharstr(0)) |
1819 call assert_equal('', getcharstr(1)) | 1819 call assert_equal('', getcharstr(1)) |
1820 | 1820 |
1821 call feedkeys("\<M-F2>", '') | |
1822 call assert_equal("\<M-F2>", getchar(0)) | |
1823 call assert_equal(0, getchar(0)) | |
1824 | |
1821 call setline(1, 'xxxx') | 1825 call setline(1, 'xxxx') |
1822 call test_setmouse(1, 3) | 1826 call test_setmouse(1, 3) |
1823 let v:mouse_win = 9 | 1827 let v:mouse_win = 9 |
1824 let v:mouse_winid = 9 | 1828 let v:mouse_winid = 9 |
1825 let v:mouse_lnum = 9 | 1829 let v:mouse_lnum = 9 |