diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-01 07:13:02 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-02 08:03:44 +0800 |
| commit | a600e73007a2cc9ced7eeaeb5f8c05ac454d080e (patch) | |
| tree | 756fbd60ecb96713c98f2e1e44b1e685f8c6bb30 /src/nvim/testdir | |
| parent | 41f308feab35007534f0c213947701174d60c548 (diff) | |
| download | rneovim-a600e73007a2cc9ced7eeaeb5f8c05ac454d080e.tar.gz rneovim-a600e73007a2cc9ced7eeaeb5f8c05ac454d080e.tar.bz2 rneovim-a600e73007a2cc9ced7eeaeb5f8c05ac454d080e.zip | |
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 vim/vim#11427)
https://github.com/vim/vim/commit/8ab9ca93eea32b318235384720200771863ecaee
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_mapping.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index 2d8c45210b..a286774d56 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -1050,6 +1050,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 Ntest_setmouse(&lines - 1, 1) + return "\<LeftMouse>" + endfunc + func DragExpr() + 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') +endfunc + " Test for mapping <LeftDrag> in Insert mode func Test_mouse_drag_insert_map() set mouse=a |