diff --git a/autoload/flake8.vim b/autoload/flake8.vim index 06a1b6b..9b7fcaf 100644 --- a/autoload/flake8.vim +++ b/autoload/flake8.vim @@ -234,13 +234,15 @@ function! s:UnplaceMarkers() " {{{ unlet s:signids endif " file markers - for l:val in values(s:markerdata) - if has_key(l:val, 'matchid') - call matchdelete(l:val.matchid) - unlet l:val.matchid - unlet l:val.matchstr - endif - endfor + if exists('s:markerdata') + for l:val in values(s:markerdata) + if has_key(l:val, 'matchid') + call matchdelete(l:val.matchid) + unlet l:val.matchid + unlet l:val.matchstr + endif + endfor + endif endfunction " }}} "" }}}