diff options
author | Dylan Armstrong <dylan@dylan.is> | 2021-02-26 19:38:07 -0600 |
---|---|---|
committer | Dylan Armstrong <dylan@dylan.is> | 2021-02-26 19:38:07 -0600 |
commit | 409b2711fe788bc550be214ef5e99ea9e6ac97f8 (patch) | |
tree | 0d1f90b183668324ae852358dcd329145c15d745 | |
parent | c1fbc2ddf15b2f44b615f90b2511349ab974cb83 (diff) | |
download | rneovim-409b2711fe788bc550be214ef5e99ea9e6ac97f8.tar.gz rneovim-409b2711fe788bc550be214ef5e99ea9e6ac97f8.tar.bz2 rneovim-409b2711fe788bc550be214ef5e99ea9e6ac97f8.zip |
fix: segfault when pasting in term with empty buffer
-rw-r--r-- | src/nvim/ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |