aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/normal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 217bf4f876..6b932c27d7 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -5042,7 +5042,10 @@ static void nv_scroll(cmdarg_T *cap)
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
}
- cursor_correct(); /* correct for 'so' */
+ // Correct for 'so', except when an operator is pending.
+ if (cap->oap->op_type == OP_NOP) {
+ cursor_correct();
+ }
beginline(BL_SOL | BL_FIX);
}