Permalink
Browse files

Fix issue #270.

  • Loading branch information...
1 parent e88527c commit a5357fc82441262ef46cc775f47cb9c0184e2671 @Rip-Rip committed Feb 15, 2013
Showing with 2 additions and 6 deletions.
  1. +1 −1 plugin/clang_complete.vim
  2. +1 −5 plugin/libclang.py
@@ -351,7 +351,7 @@ function! s:ClangQuickFix(clang_output, tempfname)
if g:clang_use_library == 0
let l:list = s:ClangUpdateQuickFix(a:clang_output, a:tempfname)
else
- python vim.command('let l:list = ' + str(getCurrentQuickFixList()))
+ let l:list = pyeval('getCurrentQuickFixList()')
python highlightCurrentDiagnostics()
endif
View
@@ -197,15 +197,11 @@ def getQuickFix(diagnostic):
elif diagnostic.severity == diagnostic.Note:
type = 'I'
elif diagnostic.severity == diagnostic.Warning:
- if "argument unused during compilation" in diagnostic.spelling:
- return None
type = 'W'
elif diagnostic.severity == diagnostic.Error:
type = 'E'
elif diagnostic.severity == diagnostic.Fatal:
type = 'E'
- else:
- return None
return dict({ 'bufnr' : int(vim.eval("bufnr('" + filename + "', 1)")),
'lnum' : diagnostic.location.line,
@@ -214,7 +210,7 @@ def getQuickFix(diagnostic):
'type' : type})
def getQuickFixList(tu):
- return filter (None, map (getQuickFix, tu.diagnostics))
+ return map (getQuickFix, tu.diagnostics)
def highlightRange(range, hlGroup):
pattern = '/\%' + str(range.start.line) + 'l' + '\%' \

0 comments on commit a5357fc

Please sign in to comment.