Allow multiple calls to VundleLog.

If it was loaded, unload the log buffer before editing it.  Otherwise the
editing command can "hang" if the user has `set hidden`.

This problem was originally discovered with the VundleChangelog command and
the analogous fix was applied in 7d9b10.  See github issue #468 for more.
This commit is contained in:
Lucas Hoffmann 2015-03-03 10:56:24 +01:00
parent 088295df77
commit 5f27abb958

View File

@ -58,6 +58,9 @@ func! s:view_log()
let s:log_file = tempname()
endif
if bufloaded(s:log_file)
execute 'silent bdelete' s:log_file
endif
call writefile(g:vundle_log, s:log_file)
execute 'silent pedit ' . s:log_file