1
0
forked from aniani/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 #9531)
This commit is contained in:
Shougo Matsushita
2022-01-20 15:26:03 +00:00
committed by Bram Moolenaar
parent 92000e2e71
commit 4ede01f188
6 changed files with 95 additions and 4 deletions

View File

@@ -624,6 +624,10 @@ op_delete(oparg_T *oap)
return FAIL;
}
if (VIsual_select && oap->is_VIsual)
// use register given with CTRL_R, defaults to zero
oap->regname = VIsual_select_reg;
#ifdef FEAT_CLIPBOARD
adjust_clip_reg(&oap->regname);
#endif