From 409b2711fe788bc550be214ef5e99ea9e6ac97f8 Mon Sep 17 00:00:00 2001 From: Dylan Armstrong Date: Fri, 26 Feb 2021 19:38:07 -0600 Subject: fix: segfault when pasting in term with empty buffer --- src/nvim/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 3038fad894..32498b7f97 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 (curbuf->terminal) { + if (y_size > 0 && curbuf->terminal) { terminal_paste(count, y_array, y_size); return; } -- cgit