From b6170db1a1c6cec55b0cd0075b54b8370650aa14 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 26 Feb 2016 18:43:32 +0100 Subject: Avoid internal errors with setloclist() All syntastic users experienced this problem: E685: Internal error: get_tv_string_buf() It's reproducable with: :call setloclist(0, ['']) So, not given optional arguments to setloclist() lead to some fields not inizilied and the code took the wrong branches. --- src/nvim/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 31175773f0..982c14cd08 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -15251,7 +15251,7 @@ static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg, action = *act; } - if (title_arg->v_type != VAR_UNKNOWN) { + if (title_arg->v_type == VAR_STRING) { title = get_tv_string_chk(title_arg); if (!title) { return; // type error; errmsg already given -- cgit