mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
vim-patch:8.2.4818: no test for what 8.2.4806 fixes
Problem: No test for what 8.2.4806 fixes.
Solution: Add a test. (closes vim/vim#10727)
ac92ab7719
Test cannot be used because it must use test_setmouse(). Use a Lua test.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user