aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/terminal.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 32498b7f97..3038fad894 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2971,7 +2971,7 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
y_array = reg->y_array;
}
- if (y_size > 0 && curbuf->terminal) {
+ if (curbuf->terminal) {
terminal_paste(count, y_array, y_size);
return;
}
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 642c443318..034de56f9c 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -569,6 +569,9 @@ static bool is_filter_char(int c)
void terminal_paste(long count, char_u **y_array, size_t y_size)
{
+ if (y_size == 0) {
+ return;
+ }
vterm_keyboard_start_paste(curbuf->terminal->vt);
terminal_flush_output(curbuf->terminal);
size_t buff_len = STRLEN(y_array[0]);