diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-03-24 08:49:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-24 08:49:02 +0100 |
commit | 0920c6ca812d673628cf6d04d68af50cddccbd3e (patch) | |
tree | a2e4c5d7a286c10b55cbb8c39fc06b9218e0a1d5 /src | |
parent | b3b8910c486966f626d760a4eaec4a5c8bd4cc01 (diff) | |
parent | 4e49e442595f901ca2c3c76f3bef8e093489a438 (diff) | |
download | rneovim-0920c6ca812d673628cf6d04d68af50cddccbd3e.tar.gz rneovim-0920c6ca812d673628cf6d04d68af50cddccbd3e.tar.bz2 rneovim-0920c6ca812d673628cf6d04d68af50cddccbd3e.zip |
Merge pull request #9772 from gelguy/float-inccommand
floating-window.c: fix crash when using inccommand
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/window.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index c25322c162..8355f5397f 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2462,7 +2462,7 @@ int win_close(win_T *win, bool free_buf) } if (!was_floating) { - if (p_ea && (*p_ead == 'b' || *p_ead == dir)) { + if (!curwin->w_floating && p_ea && (*p_ead == 'b' || *p_ead == dir)) { // If the frame of the closed window contains the new current window, // only resize that frame. Otherwise resize all windows. win_equal(curwin, curwin->w_frame->fr_parent == win_frame, dir); @@ -4656,8 +4656,12 @@ void win_size_restore(garray_T *gap) { int i = 0; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { - frame_setwidth(wp->w_frame, ((int *)gap->ga_data)[i++]); - win_setheight_win(((int *)gap->ga_data)[i++], wp); + int width = ((int *)gap->ga_data)[i++]; + int height = ((int *)gap->ga_data)[i++]; + if (!wp->w_floating) { + frame_setwidth(wp->w_frame, width); + win_setheight_win(height, wp); + } } } /* recompute the window positions */ |