aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 37db1bb7e2..8fddb1b561 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1197,7 +1197,13 @@ int insert_reg(
retval = FAIL;
} else {
for (size_t i = 0; i < reg->y_size; i++) {
- stuffescaped((const char *)reg->y_array[i], literally);
+ if (regname == '-') {
+ AppendCharToRedobuff(Ctrl_R);
+ AppendCharToRedobuff(regname);
+ do_put(regname, NULL, BACKWARD, 1L, PUT_CURSEND);
+ } else {
+ stuffescaped((const char *)reg->y_array[i], literally);
+ }
// Insert a newline between lines and after last line if
// y_type is kMTLineWise.
if (reg->y_type == kMTLineWise || i < reg->y_size - 1) {