if !s:displayed_warnings
let l:show_website_url = 0
- let l:msg = "has been depreciated in favour of flake8 config files"
+ let l:msg = "has been deprecated in favour of flake8 config files"
for setting_name in ['g:flake8_ignore', 'g:flake8_builtins', 'g:flake8_max_line_length', 'g:flake8_max_complexity']
if exists(setting_name)
echohl WarningMsg | echom setting_name l:msg | echohl None
" read config
call s:Setup()
- if !executable(s:flake8_cmd)
- echoerr "File " . s:flake8_cmd . " not found. Please install it first."
+ let l:executable = split(s:flake8_cmd)[0]
+
+ if !executable(l:executable)
+ echoerr "File " . l:executable . " not found. Please install it first."
return
endif
let l:old_gfm=&grepformat
let l:old_gp=&grepprg
let l:old_shellpipe=&shellpipe
+ let l:old_t_ti=&t_ti
+ let l:old_t_te=&t_te
" write any changes before continuing
if &readonly == 0
endif
set lazyredraw " delay redrawing
- cclose " close any existing cwindows
- " set shellpipe to > instead of tee (suppressing output)
+ " prevent terminal from blinking
set shellpipe=>
+ set t_ti=
+ set t_te=
" perform the grep itself
let &grepformat="%f:%l:%c: %m\,%f:%l: %m"
let &grepprg=s:flake8_cmd
silent! grep! "%"
+ " close any existing cwindows,
+ " placed after 'grep' in case quickfix is open on autocmd QuickFixCmdPost
+ cclose
" restore grep settings
let &grepformat=l:old_gfm
let &grepprg=l:old_gp
let &shellpipe=l:old_shellpipe
+ let &t_ti=l:old_t_ti
+ let &t_te=l:old_t_te
" process results
let l:results=getqflist()