aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 98832a98c9..7a4e5d3eeb 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3600,6 +3600,10 @@ void ex_buffer_all(exarg_T *eap)
all = true;
}
+ // Stop Visual mode, the cursor and "VIsual" may very well be invalid after
+ // switching to another buffer.
+ reset_VIsual_and_resel();
+
setpcmark();
// Close superfluous windows (two windows for the same buffer).