comparison 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
comparison
equal deleted inserted replaced
28587:315269cfa4cc 28588:a1de4ee8c40d
1564 nunmap <F5> 1564 nunmap <F5>
1565 unlet g:foo 1565 unlet g:foo
1566 %bw! 1566 %bw!
1567 endfunc 1567 endfunc
1568 1568
1569 func Test_mouse_drag_mapped_start_select()
1570 set mouse=a
1571 set selectmode=key,mouse
1572 func ClickExpr()
1573 call test_setmouse(1, 1)
1574 return "\<LeftMouse>"
1575 endfunc
1576 func DragExpr()
1577 call test_setmouse(1, 2)
1578 return "\<LeftDrag>"
1579 endfunc
1580 nnoremap <expr> <F2> ClickExpr()
1581 nmap <expr> <F3> DragExpr()
1582
1583 nnoremap <LeftDrag> <LeftDrag><Cmd><CR>
1584 exe "normal \<F2>\<F3>"
1585 call assert_equal('s', mode())
1586 exe "normal! \<C-\>\<C-N>"
1587
1588 nunmap <LeftDrag>
1589 nunmap <F2>
1590 nunmap <F3>
1591 delfunc ClickExpr
1592 delfunc DragExpr
1593 set selectmode&
1594 set mouse&
1595 endfunc
1596
1569 " Test for mapping <LeftDrag> in Insert mode 1597 " Test for mapping <LeftDrag> in Insert mode
1570 func Test_mouse_drag_insert_map() 1598 func Test_mouse_drag_insert_map()
1571 set mouse=a 1599 set mouse=a
1572 func ClickExpr() 1600 func ClickExpr()
1573 call test_setmouse(1, 1) 1601 call test_setmouse(1, 1)