aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index bce54eecdc..fe40cd2a95 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -364,14 +364,16 @@ newwindow:
/*FALLTHROUGH*/
case ']':
case Ctrl_RSB:
- CHECK_CMDWIN reset_VIsual_and_resel(); /* stop Visual mode */
+ CHECK_CMDWIN
+ // Keep visual mode, can select words to use as a tag.
if (Prenum)
postponed_split = Prenum;
else
postponed_split = -1;
+ g_do_tagpreview = 0;
- /* Execute the command right here, required when
- * "wincmd ]" was used in a function. */
+ // Execute the command right here, required when
+ // "wincmd ]" was used in a function.
do_nv_ident(Ctrl_RSB, NUL);
break;
@@ -457,7 +459,7 @@ wingotofile:
/*FALLTHROUGH*/
case ']':
case Ctrl_RSB:
- reset_VIsual_and_resel(); /* stop Visual mode */
+ // Keep visual mode, can select words to use as a tag.
if (Prenum)
postponed_split = Prenum;
else
@@ -948,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
*/
@@ -3692,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();
}