summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ye <lolz836@gmail.com>2018-09-16 22:57:43 +1000
committerJames Ye <lolz836@gmail.com>2018-09-16 22:57:43 +1000
commit87743faf2ad2ef0f663a904b2516d216db9fcf2e (patch)
treeeb3bcc7bb7c4e47f961d6674dbe4e51cb5776112
parentf1f2a222281c9e489c3ca6a4f72329c08d4646a6 (diff)
downloadale-87743faf2ad2ef0f663a904b2516d216db9fcf2e.zip
c#ParseCFlags: don't index empty list
-rw-r--r--autoload/ale/c.vim2
1 files changed, 1 insertions, 1 deletions
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