diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2018-09-14 13:16:31 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-09-14 19:16:30 +0200 |
commit | c03e8307d2eff687034b71d59c859e5c267661c8 (patch) | |
tree | 9dcb536c40d82d9e1ba6fe99004dd4b2678b271a /src | |
parent | 1bc44a805a2c9213ebe2c0603dfc714c306f50ac (diff) | |
download | rneovim-c03e8307d2eff687034b71d59c859e5c267661c8.tar.gz rneovim-c03e8307d2eff687034b71d59c859e5c267661c8.tar.bz2 rneovim-c03e8307d2eff687034b71d59c859e5c267661c8.zip |
vim-patch:8.0.1201: "yL" is affected by 'scrolloff' (#8997)
Problem: "yL" is affected by 'scrolloff'. (Eli the Bearded)
Solution: Don't use 'scrolloff' when an operator is pending.
https://github.com/vim/vim/commit/44cc4cf72fdd12cd9a779031d443aac4254d51ae
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/normal.c | 5 |
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); } |