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)
4ede01f188
This commit is contained in:
Shougo Matsushita
2022-01-21 09:36:26 +09:00
parent 431915fe6a
commit d7ab4e819a
5 changed files with 91 additions and 5 deletions

View File

@@ -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);
/*