aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-02 09:06:38 +0800
committerGitHub <noreply@github.com>2022-11-02 09:06:38 +0800
commit44b88d8c310e778c55ef1f7a270d2651266054ca (patch)
tree371299acff87e8f92ad113c25ce72a44f3e64223 /src/nvim/window.c
parent41f308feab35007534f0c213947701174d60c548 (diff)
parent419ee612e692fb8985342a2091a0d9bf6dfffe46 (diff)
downloadrneovim-44b88d8c310e778c55ef1f7a270d2651266054ca.tar.gz
rneovim-44b88d8c310e778c55ef1f7a270d2651266054ca.tar.bz2
rneovim-44b88d8c310e778c55ef1f7a270d2651266054ca.zip
Merge pull request #20904 from zeertzjq/vim-9.0.0822
vim-patch:9.0.{0822,0823,0824,0825}: window dragging fixes
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 4812b9ef9d..c755f58c4f 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4213,6 +4213,8 @@ static int leave_tabpage(buf_T *new_curbuf, bool trigger_leave_autocmds)
return FAIL;
}
}
+
+ reset_dragwin();
tp->tp_curwin = curwin;
tp->tp_prevwin = prevwin;
tp->tp_firstwin = firstwin;
@@ -4275,6 +4277,10 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, bool trigger_enter_a
clear_cmdline = true;
}
+ // If there was a click in a window, it won't be usable for a following
+ // drag.
+ reset_dragwin();
+
// The tabpage line may have appeared or disappeared, may need to resize the frames for that.
// When the Vim window was resized or ROWS_AVAIL changed need to update frame sizes too.
if (curtab->tp_old_Rows_avail != ROWS_AVAIL || (old_off != firstwin->w_winrow)) {