aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-01-16 08:21:25 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-01-16 08:21:25 +0100
commit60d6a8b13d2eb5cdc5ab2740a9becc3b24e1eb71 (patch)
tree50faa8d8addc7425b4823ee9a9440c3c642a51eb /src
parentc06995b34d604a37f80ee1174fcb3530dbd59206 (diff)
parent514a51ef3e63362d9d96f23930bbde5cd8581da8 (diff)
downloadrneovim-60d6a8b13d2eb5cdc5ab2740a9becc3b24e1eb71.tar.gz
rneovim-60d6a8b13d2eb5cdc5ab2740a9becc3b24e1eb71.tar.bz2
rneovim-60d6a8b13d2eb5cdc5ab2740a9becc3b24e1eb71.zip
Merge #7860 'fix get_buffer_lines'
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index b6767c3457..28c590c0b4 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -9259,7 +9259,9 @@ static void get_buffer_lines(buf_T *buf, linenr_T start, linenr_T end, int retli
rettv->vval.v_string = NULL;
if (buf == NULL || buf->b_ml.ml_mfp == NULL || start < 0 || end < start) {
- tv_list_alloc_ret(rettv, 0);
+ if (retlist) {
+ tv_list_alloc_ret(rettv, 0);
+ }
return;
}