aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_mapping.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-01 20:22:48 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-02 08:06:37 +0800
commit39f85cdf6b40cbdd26256260d0d6d4e071b631a2 (patch)
tree4edecc7da99f4878bff893740b932a1b0c1d01a2 /src/nvim/testdir/test_mapping.vim
parent20bd4d89977005845c070cde9df75496f948fa1e (diff)
downloadrneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.tar.gz
rneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.tar.bz2
rneovim-39f85cdf6b40cbdd26256260d0d6d4e071b631a2.zip
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 vim/vim#11479, closes vim/vim#11427) https://github.com/vim/vim/commit/873f41a0187e81a22aa4622fbf938de72a54abba
Diffstat (limited to 'src/nvim/testdir/test_mapping.vim')
-rw-r--r--src/nvim/testdir/test_mapping.vim14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim
index a286774d56..560883ba5d 100644
--- a/src/nvim/testdir/test_mapping.vim
+++ b/src/nvim/testdir/test_mapping.vim
@@ -1054,18 +1054,24 @@ func Test_mouse_drag_statusline()
set laststatus=2
set mouse=a
func ClickExpr()
- call Ntest_setmouse(&lines - 1, 1)
- return "\<LeftMouse>"
+ call Ntest_setmouse(&lines - 1, 1)
+ return "\<LeftMouse>"
endfunc
func DragExpr()
- call Ntest_setmouse(&lines - 2, 1)
- return "\<LeftDrag>"
+ call Ntest_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