aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2022-01-21 09:36:26 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2022-01-22 11:57:06 +0900
commitd7ab4e819a89c12b74772217e725c640858a18c6 (patch)
treefbbc990be752cee4b482c31057dc29897812a9b3 /src/nvim/ops.c
parent431915fe6af4e176a84a60c95ad7aa9d36b71e50 (diff)
downloadrneovim-d7ab4e819a89c12b74772217e725c640858a18c6.tar.gz
rneovim-d7ab4e819a89c12b74772217e725c640858a18c6.tar.bz2
rneovim-d7ab4e819a89c12b74772217e725c640858a18c6.zip
vim-patch:8.2.4160: cannot change the register used for Select mode delete
Problem: Cannot change the register used for Select mode delete. Solution: Make CTRL-R set the register to be used when deleting text for Select mode. (Shougo Matsushita, closes vim/vim#9531) https://github.com/vim/vim/commit/4ede01f18884961f2e008880b4964e5d61ea5c36
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 1a12cb636a..497d756cdd 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1435,6 +1435,11 @@ int op_delete(oparg_T *oap)
return FAIL;
}
+ if (VIsual_select && oap->is_VIsual) {
+ // Use the register given with CTRL_R, defaults to zero
+ oap->regname = VIsual_select_reg;
+ }
+
mb_adjust_opend(oap);
/*