diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-11-30 21:39:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 21:39:22 -0500 |
commit | 2635b77dba6fa218871441fa3380860405bf9240 (patch) | |
tree | 6a08da483299dbbfc15c0fa16a8a0092f8ebc775 /src/nvim/window.c | |
parent | 36565c9da227f6da68e3bd3a1232ac17dd994ea1 (diff) | |
parent | dac52e6d044d27cd6d51fdde2fa3be3f9dba11a4 (diff) | |
download | rneovim-2635b77dba6fa218871441fa3380860405bf9240.tar.gz rneovim-2635b77dba6fa218871441fa3380860405bf9240.tar.bz2 rneovim-2635b77dba6fa218871441fa3380860405bf9240.zip |
Merge pull request #16420 from seandewar/vim-8.1.2136
vim-patch:8.1.2136,8.2.2465
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index e328ff5467..3e6e42dec2 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4525,6 +4525,7 @@ static void win_enter_ext(win_T *const wp, const int flags) fix_current_dir(); + // Careful: autocommands may close the window and make "wp" invalid if (flags & WEE_TRIGGER_NEW_AUTOCMDS) { apply_autocmds(EVENT_WINNEW, NULL, NULL, false, curbuf); } @@ -4558,7 +4559,7 @@ static void win_enter_ext(win_T *const wp, const int flags) } // set window width to desired minimal value - if (curwin->w_width < p_wiw && !curwin->w_p_wfw && !wp->w_floating) { + if (curwin->w_width < p_wiw && !curwin->w_p_wfw && !curwin->w_floating) { win_setwidth((int)p_wiw); } |