diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-28 12:01:44 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-10 17:24:29 +0800 |
commit | 63f6ecd4196680674504482475459d0ce6f49904 (patch) | |
tree | 59debc90b2d84ec16dbace201418f7bf431660e2 /src | |
parent | 63f63dd2b7e06f872727d1d9d14ce177dc77ef83 (diff) | |
download | rneovim-63f6ecd4196680674504482475459d0ce6f49904.tar.gz rneovim-63f6ecd4196680674504482475459d0ce6f49904.tar.bz2 rneovim-63f6ecd4196680674504482475459d0ce6f49904.zip |
fix(float): fix mouse drag position if float window turned to a split
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/window.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index ca99cc8cbc..7895391697 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1941,7 +1941,7 @@ static void win_totop(int size, int flags) } else { // No longer a float, a non-multigrid UI shouldn't draw it as such ui_call_win_hide(curwin->w_grid_alloc.handle); - win_free_grid(curwin, false); + win_free_grid(curwin, true); } } else { // Remove the window and frame from the tree of frames. @@ -5179,8 +5179,7 @@ void win_free_grid(win_T *wp, bool reinit) } grid_free(&wp->w_grid_alloc); if (reinit) { - // if a float is turned into a split and back into a float, the grid - // data structure will be reused + // if a float is turned into a split, the grid data structure will be reused memset(&wp->w_grid_alloc, 0, sizeof(wp->w_grid_alloc)); } } |