1
0
forked from aniani/vim

patch 9.0.0824: crash when using win_move_separator() in other tab page

Problem:    Crash when using win_move_separator() in other tab page.
Solution:   Check for valid window in current tab page.
            (closes #11479, closes #11427)
This commit is contained in:
zeertzjq
2022-11-01 11:44:43 +00:00
committed by Bram Moolenaar
parent 7a7db047dc
commit 873f41a018
4 changed files with 27 additions and 4 deletions

View File

@@ -1652,18 +1652,24 @@ func Test_mouse_drag_statusline()
set laststatus=2
set mouse=a
func ClickExpr()
call test_setmouse(&lines - 1, 1)
return "\<LeftMouse>"
call test_setmouse(&lines - 1, 1)
return "\<LeftMouse>"
endfunc
func DragExpr()
call test_setmouse(&lines - 2, 1)
return "\<LeftDrag>"
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')
nunmap <F2>
nunmap <F3>
delfunc ClickExpr
delfunc DragExpr
set laststatus& mouse&
endfunc
" Test for mapping <LeftDrag> in Insert mode