Skip to content

Commit 6bdd7b4

Browse files
committed
Clean on exit.
1 parent 1361c99 commit 6bdd7b4

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

autoload/pymode.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,9 @@ fun! pymode#debug(msg) "{{{
130130
echom string(g:pymode_debug) . ': ' . string(a:msg)
131131
endif
132132
endfunction "}}}
133+
134+
fun! pymode#quit() "{{{
135+
augroup pymode
136+
au!
137+
augroup END
138+
endfunction "}}}

ftplugin/python/pymode.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ if g:pymode_lint
6767
command! -buffer -nargs=0 PymodeLintToggle :call pymode#lint#toggle()
6868
command! -buffer -nargs=0 PymodeLint :call pymode#lint#check()
6969

70+
if v:version > 703 || (v:version == 703 && has('patch544'))
71+
au! QuitPre <buffer> call pymode#quit()
72+
else
73+
au! pymode BufWinLeave * silent! lclose
74+
endif
75+
7076
let b:pymode_error_line = -1
7177

7278
if g:pymode_lint_on_fly

0 commit comments

Comments
 (0)