aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-04 07:05:05 +0800
committerGitHub <noreply@github.com>2025-03-04 07:05:05 +0800
commit8ce504820af04194a41acbe1f4c61cf12bd5feb5 (patch)
treeb8ea43958545d28841001cf030109bdf520f970a /src
parent65a3da8b15ffb31ee3cdbc5d651cab7ee36fe884 (diff)
downloadrneovim-8ce504820af04194a41acbe1f4c61cf12bd5feb5.tar.gz
rneovim-8ce504820af04194a41acbe1f4c61cf12bd5feb5.tar.bz2
rneovim-8ce504820af04194a41acbe1f4c61cf12bd5feb5.zip
vim-patch:9.1.1167: mark '] wrong after copying text object (#32712)
Problem: mark '] wrong after copying text object (ubaldot) Solution: Adjust position of '] for non-linewise, exclusive motions (Jim Zhou) related: vim/vim#16679 closes: vim/vim#16772 https://github.com/vim/vim/commit/360a39ae6c823dd3e3c89c209b544f345c6d86dd Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 72c75534d4..0bda14402f 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2806,6 +2806,10 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
curbuf->b_op_start.col = 0;
curbuf->b_op_end.col = MAXCOL;
}
+ if (yank_type != kMTLineWise && !oap->inclusive) {
+ // Exclude the end position.
+ decl(&curbuf->b_op_end);
+ }
}
}