diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-25 07:52:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 07:52:35 +0800 |
commit | 4cf1bcf1836a8f8fc89425a4c83b9975583a5f28 (patch) | |
tree | 0a2a522f4a01562d571809ed58f42a0d203f505c /test/functional/legacy/mapping_spec.lua | |
parent | 2caf5bbbc58fcc9830cd3f8a6110b66040c6e660 (diff) | |
parent | 48a35106efefa8f74d850d3eac365dc76b008ca3 (diff) | |
download | rneovim-4cf1bcf1836a8f8fc89425a4c83b9975583a5f28.tar.gz rneovim-4cf1bcf1836a8f8fc89425a4c83b9975583a5f28.tar.bz2 rneovim-4cf1bcf1836a8f8fc89425a4c83b9975583a5f28.zip |
Merge pull request #18248 from zeertzjq/vim-8.2.4806
vim-patch:8.2.{4806,4818}: a mapping using <LeftDrag> does not start Select mode
Diffstat (limited to 'test/functional/legacy/mapping_spec.lua')
-rw-r--r-- | test/functional/legacy/mapping_spec.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/legacy/mapping_spec.lua b/test/functional/legacy/mapping_spec.lua index aa29698589..0f65d5eb65 100644 --- a/test/functional/legacy/mapping_spec.lua +++ b/test/functional/legacy/mapping_spec.lua @@ -129,10 +129,23 @@ describe('mapping', function() ]]) end) + it('dragging starts Select mode even if coming from mapping vim-patch:8.2.4806', function() + command('set mouse=a') + command('set selectmode=mouse') + + command('nnoremap <LeftDrag> <LeftDrag><Cmd><CR>') + sleep(10) + meths.input_mouse('left', 'press', '', 0, 0, 0) + sleep(10) + meths.input_mouse('left', 'drag', '', 0, 0, 1) + sleep(10) + eq('s', eval('mode()')) + end) + it('<LeftDrag> mapping in Insert mode works correctly vim-patch:8.2.4692', function() command('set mouse=a') - command([[inoremap <LeftDrag> <LeftDrag><Cmd>let g:dragged = 1<CR>]]) + command('inoremap <LeftDrag> <LeftDrag><Cmd>let g:dragged = 1<CR>') feed('i') sleep(10) meths.input_mouse('left', 'press', '', 0, 0, 0) |