diff options
author | w0rp <devw0rp@gmail.com> | 2019-01-27 09:12:59 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-01-27 09:12:59 +0000 |
commit | 20b9dfdb4a12a4916259455ee068baf3118bd012 (patch) | |
tree | 36959851730d4769fd8d7ab28ef49163cfe2ba40 /autoload | |
parent | 6e9040da75cc9c9f6f496180847d51986754decd (diff) | |
download | ale-20b9dfdb4a12a4916259455ee068baf3118bd012.zip |
Fix #2195 - Handle the command key being missing
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/c.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ale/c.vim b/autoload/ale/c.vim index 5e7aa92a..6ac2d398 100644 --- a/autoload/ale/c.vim +++ b/autoload/ale/c.vim @@ -221,7 +221,7 @@ function! ale#c#ParseCompileCommandsFlags(buffer, file_lookup, dir_lookup) abort let l:file_list = get(a:file_lookup, l:basename, []) for l:item in l:file_list - if bufnr(l:item.file) is a:buffer + if bufnr(l:item.file) is a:buffer && has_key(l:item, 'command') return ale#c#ParseCFlags(l:item.directory, l:item.command) endif endfor @@ -234,6 +234,7 @@ function! ale#c#ParseCompileCommandsFlags(buffer, file_lookup, dir_lookup) abort for l:item in l:dir_list if ale#path#Simplify(fnamemodify(l:item.file, ':h')) is? l:dir + \&& has_key(l:item, 'command') return ale#c#ParseCFlags(l:item.directory, l:item.command) endif endfor |