aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 24267ebd50..2917bb31ee 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1092,7 +1092,7 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *en
// cursor at end
*cursor = vcol + incr - 1;
} else {
- if ((State & MODE_INSERT) == 0 && !on_NUL) {
+ if (((State & MODE_INSERT) == 0 || !cts.cts_has_right_gravity) && !on_NUL) {
// cursor is after inserted text, unless on the NUL
vcol += cts.cts_cur_text_width;
}