Merge pull request #2272 from Rahlir/fix-c-compilecommand

Fix error when parsing compile_commands for c languages
This commit is contained in:
w0rp 2019-02-08 20:06:12 +00:00 committed by GitHub
commit 3ba7d02708
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,7 +202,7 @@ function! s:GetLookupFromCompileCommandsFile(compile_commands_file) abort
let l:file_lookup[l:basename] = get(l:file_lookup, l:basename, []) + [l:entry]
let l:dirbasename = tolower(fnamemodify(l:entry.directory, ':p:h:t'))
let l:dir_lookup[l:dirbasename] = get(l:dir_lookup, l:basename, []) + [l:entry]
let l:dir_lookup[l:dirbasename] = get(l:dir_lookup, l:dirbasename, []) + [l:entry]
endfor
if !empty(l:file_lookup) && !empty(l:dir_lookup)