forked from aniani/vim
patch 9.0.0822: crash when dragging the statusline with a mapping
Problem: Crash when dragging the statusline with a mapping. Solution: Check for valid window pointer. (issue #11427)
This commit is contained in:
@@ -1648,6 +1648,24 @@ func Test_mouse_drag_mapped_start_select()
|
||||
set mouse&
|
||||
endfunc
|
||||
|
||||
func Test_mouse_drag_statusline()
|
||||
set laststatus=2
|
||||
set mouse=a
|
||||
func ClickExpr()
|
||||
call test_setmouse(&lines - 1, 1)
|
||||
return "\<LeftMouse>"
|
||||
endfunc
|
||||
func DragExpr()
|
||||
call test_setmouse(&lines - 2, 1)
|
||||
return "\<LeftDrag>"
|
||||
endfunc
|
||||
nnoremap <expr> <F2> ClickExpr()
|
||||
nnoremap <expr> <F3> DragExpr()
|
||||
|
||||
" this was causing a crash in win_drag_status_line()
|
||||
call feedkeys("\<F2>:tabnew\<CR>\<F3>", 'tx')
|
||||
endfunc
|
||||
|
||||
" Test for mapping <LeftDrag> in Insert mode
|
||||
func Test_mouse_drag_insert_map()
|
||||
set mouse=a
|
||||
|
Reference in New Issue
Block a user