aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 357e9184d7..aa77c03b48 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -6770,13 +6770,8 @@ static void stop_insert(pos_T *end_insert_pos, int esc, int nomove)
// <C-S-Right> may have started Visual mode, adjust the position for
// deleted characters.
- if (VIsual_active && VIsual.lnum == curwin->w_cursor.lnum) {
- int len = (int)STRLEN(get_cursor_line_ptr());
-
- if (VIsual.col > len) {
- VIsual.col = len;
- VIsual.coladd = 0;
- }
+ if (VIsual_active) {
+ check_visual_pos();
}
}
}