Problem: Cannot repeat a command that uses the small delete register.
Solution: Store the register name instead of the contents. (Christian
Brabandt, closes #7527)
/*
* ops.c: implementation of various operators: op_shift, op_delete, op_tilde,
- * op_change, op_yank, do_put, do_join
+ * op_change, op_yank, do_join
*/
#include "vim.h"
{
for (i = 0; i < y_current->y_size; ++i)
{
- stuffescaped(y_current->y_array[i], literally);
+ if (regname == '-')
+ {
+ AppendCharToRedobuff(Ctrl_R);
+ AppendCharToRedobuff(regname);
+ do_put(regname, NULL, BACKWARD, 1L, PUT_CURSEND);
+ }
+ else
+ stuffescaped(y_current->y_array[i], literally);
// Insert a newline between lines and after last line if
// y_type is MLINE.
if (y_current->y_type == MLINE || i < y_current->y_size - 1)
bwipe!
endfunc
+func Test_insert_small_delete()
+ new
+ call setline(1, ['foo foobar bar'])
+ call cursor(1,1)
+ exe ":norm! ciw'\<C-R>-'"
+ call assert_equal(getline(1), "'foo' foobar bar")
+ exe ":norm! w.w."
+ call assert_equal(getline(1), "'foo' 'foobar' 'bar'")
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2189,
/**/
2188,
/**/