aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-01 07:13:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-02 08:03:44 +0800
commita600e73007a2cc9ced7eeaeb5f8c05ac454d080e (patch)
tree756fbd60ecb96713c98f2e1e44b1e685f8c6bb30 /src/nvim/window.c
parent41f308feab35007534f0c213947701174d60c548 (diff)
downloadrneovim-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/window.c')
-rw-r--r--src/nvim/window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 4812b9ef9d..8c34e4fb6c 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4195,6 +4195,7 @@ static int leave_tabpage(buf_T *new_curbuf, bool trigger_leave_autocmds)
{
tabpage_T *tp = curtab;
+ reset_mouse_got_click();
leaving_window(curwin);
reset_VIsual_and_resel(); // stop Visual mode
if (trigger_leave_autocmds) {
@@ -4392,6 +4393,7 @@ void goto_tabpage_tp(tabpage_T *tp, bool trigger_enter_autocmds, bool trigger_le
// Don't repeat a message in another tab page.
set_keep_msg(NULL, 0);
+ reset_mouse_got_click();
skip_win_fix_scroll = true;
if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer,
trigger_leave_autocmds) == OK) {