diff options
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index fbb283899b..4f94284186 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -950,6 +950,9 @@ int win_split_ins(int size, int flags, win_T *new_wp, int dir) p_wh = size; } + // Keep same changelist position in new window. + wp->w_changelistidx = oldwin->w_changelistidx; + /* * make the new window the current window */ @@ -3694,7 +3697,12 @@ win_free ( if (wp != aucmd_win) win_remove(wp, tp); - free(wp); + if (autocmd_busy) { + wp->w_next = au_pending_free_win; + au_pending_free_win = wp; + } else { + free(wp); + } unblock_autocmds(); } |