0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

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 #10727)
This commit is contained in:
zeertzjq
2022-04-24 15:58:30 +01:00
committed by Bram Moolenaar
parent 45684c6ec4
commit ac92ab7719
2 changed files with 30 additions and 0 deletions

View File

@@ -1566,6 +1566,34 @@ func Test_plug_remap()
%bw! %bw!
endfunc 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 " Test for mapping <LeftDrag> in Insert mode
func Test_mouse_drag_insert_map() func Test_mouse_drag_insert_map()
set mouse=a set mouse=a

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4818,
/**/ /**/
4817, 4817,
/**/ /**/