summaryrefslogblamecommitdiffstats
path: root/autoload/python/utils.vim
blob: 4517f00def9be9cae793c131059a44ca63e41e9e (plain) (tree)
1
2
3
4
                                                                   

        
 
















                                            
if !polyglot#util#IsEnabled('python-compiler', expand('<sfile>:p'))
  finish
endif

" Sometimes Python issues debugging messages
" which don't belong to a call stack context
" this function filters these messages
function! python#utils#fix_qflist() " {{{
  let l:traceback = []
  let l:qflist = getqflist()

  for l:item in l:qflist
    if !empty(l:item.type)
      call add(l:traceback, l:item)
    endif
  endfor

  if !empty(l:traceback)
    call setqflist(l:traceback)
  endif
endfunction " }}}