Mercurial > vim
diff src/testdir/test_mapping.vim @ 28588:a1de4ee8c40d v8.2.4818
patch 8.2.4818: no test for what 8.2.4806 fixes
Commit: https://github.com/vim/vim/commit/ac92ab771952b2a9ee39ea6fa5e70e4c072942d5
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Apr 24 15:58:30 2022 +0100
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 https://github.com/vim/vim/issues/10727)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 24 Apr 2022 17:00:04 +0200 |
parents | 04310f81143d |
children | 86bf2dabc93a |
line wrap: on
line diff
--- a/src/testdir/test_mapping.vim +++ b/src/testdir/test_mapping.vim @@ -1566,6 +1566,34 @@ func Test_plug_remap() %bw! endfunc +func Test_mouse_drag_mapped_start_select() + set mouse=a + set selectmode=key,mouse + func ClickExpr() + call test_setmouse(1, 1) + return "\<LeftMouse>" + endfunc + func DragExpr() + call test_setmouse(1, 2) + return "\<LeftDrag>" + endfunc + nnoremap <expr> <F2> ClickExpr() + nmap <expr> <F3> DragExpr() + + nnoremap <LeftDrag> <LeftDrag><Cmd><CR> + exe "normal \<F2>\<F3>" + call assert_equal('s', mode()) + exe "normal! \<C-\>\<C-N>" + + nunmap <LeftDrag> + nunmap <F2> + nunmap <F3> + delfunc ClickExpr + delfunc DragExpr + set selectmode& + set mouse& +endfunc + " Test for mapping <LeftDrag> in Insert mode func Test_mouse_drag_insert_map() set mouse=a