From b8d993932931549cc2bf8158abc9bad026d14c11 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 11 Sep 2016 13:25:03 +0200 Subject: Add python compiler, closes #147 --- autoload/python/utils.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 autoload/python/utils.vim (limited to 'autoload/python/utils.vim') diff --git a/autoload/python/utils.vim b/autoload/python/utils.vim new file mode 100644 index 00000000..51ba9ef1 --- /dev/null +++ b/autoload/python/utils.vim @@ -0,0 +1,21 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 + +" 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 " }}} + +endif -- cgit v1.2.3