diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-29 06:05:39 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-01-29 06:05:39 +0800 |
commit | 7812c6830cb8a600c33eec1854c97ac31e4e03fb (patch) | |
tree | 8615cbd2093579149e90139d409c8acc8977b5f0 /src/nvim/ops.c | |
parent | fee7d6fba4a940bdc76661fb06eaa91e24149b51 (diff) | |
download | rneovim-7812c6830cb8a600c33eec1854c97ac31e4e03fb.tar.gz rneovim-7812c6830cb8a600c33eec1854c97ac31e4e03fb.tar.bz2 rneovim-7812c6830cb8a600c33eec1854c97ac31e4e03fb.zip |
vim-patch:8.2.3455: using a count with "gp" leaves '] in wrong position
Problem: Using a count with "gp" leaves '] in wrong position. (Naohiro Ono)
Solution: Correct the mark position. (closes vim/vim#8899)
https://github.com/vim/vim/commit/56858e4ed4e338e15821767b8303b06099e40384
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 52164f6c38..52c55c8de3 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3616,6 +3616,10 @@ error: } else { curwin->w_cursor.lnum = new_lnum; curwin->w_cursor.col = col; + curbuf->b_op_end = curwin->w_cursor; + if (col > 1) { + curbuf->b_op_end.col = col - 1; + } } } else if (y_type == kMTLineWise) { // put cursor on first non-blank in first inserted line |