Skip to content
Snippets Groups Projects
Commit 2bdd7cde authored by Jerome Reybert's avatar Jerome Reybert
Browse files

plugin/magit.vim: fix warning when magit is closed with bdelete

fix #130
parent 95f8ad71
Branches
No related tags found
No related merge requests found
......@@ -765,8 +765,16 @@ function! magit#show_magit(display, ...)
" let magit buffer in read mode when cursor is not in file, to avoid
" unfortunate commit with a :wall command out of magit buffer if a commit
" message is ongoing
execute "autocmd BufEnter " . buffer_name . " :if ( b:magit_current_commit_mode != '' ) | call s:set_mode_write() | endif"
execute "autocmd BufLeave " . buffer_name . " :if ( b:magit_current_commit_mode != '' ) | call s:set_mode_read() | endif"
execute "autocmd BufEnter " . buffer_name . "
\ :if ( exists('b:magit_current_commit_mode') &&
\ b:magit_current_commit_mode != '' ) |
\ call s:set_mode_write() |
\ endif"
execute "autocmd BufLeave " . buffer_name . "
\ :if ( exists('b:magit_current_commit_mode') &&
\ b:magit_current_commit_mode != '' ) |
\ call s:set_mode_read() |
\ endif"
let b:state = deepcopy(g:magit#state#state)
" s:magit_commit_mode: global variable which states in which commit mode we are
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment