aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/cursor.c')
-rw-r--r--src/nvim/cursor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/cursor.c b/src/nvim/cursor.c
index 8c80c1dfc0..ee1bc6cf31 100644
--- a/src/nvim/cursor.c
+++ b/src/nvim/cursor.c
@@ -223,9 +223,10 @@ static int coladvance2(
} else {
int b = (int)wcol - (int)col;
- /* The difference between wcol and col is used to set coladd. */
- if (b > 0 && b < (MAXCOL - 2 * curwin->w_grid.Columns))
+ // The difference between wcol and col is used to set coladd.
+ if (b > 0 && b < (MAXCOL - 2 * curwin->w_grid.Columns)) {
pos->coladd = b;
+ }
col += b;
}