{
for (i = 0; i < y_current->y_size; ++i)
{
- if (regname == '-')
+ if (regname == '-' && y_current->y_type == MCHAR)
{
int dir = BACKWARD;
if ((State & REPLACE_FLAG) != 0)
do_put(regname, NULL, dir, 1L, PUT_CURSEND);
}
else
+ {
stuffescaped(y_current->y_array[i].string, 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)
- stuffcharReadbuff('\n');
+ // 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)
+ stuffcharReadbuff('\n');
+ }
}
}
}
bw!
endfunc
+func Test_insert_small_delete_linewise()
+ new
+ call setline(1, ['foo'])
+ call cursor(1, 1)
+ exe ":norm! \"-cc\<C-R>-"
+ call assert_equal(['foo', ''], getline(1, '$'))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab