From 87743faf2ad2ef0f663a904b2516d216db9fcf2e Mon Sep 17 00:00:00 2001 From: James Ye Date: Sun, 16 Sep 2018 22:57:43 +1000 Subject: [PATCH] c#ParseCFlags: don't index empty list --- autoload/ale/c.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim index e7b43d88..ce59ae31 100644 --- a/autoload/ale/c.vim +++ b/autoload/ale/c.vim @@ -55,7 +55,7 @@ function! ale#c#ParseCFlags(path_prefix, cflag_line) abort " Check if cflag contained a '-' and should not have been splitted let l:option_list = split(l:option, '\zs') - if l:option_list[-1] isnot# ' ' + if len(l:option_list) > 0 && l:option_list[-1] isnot# ' ' continue endif