vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 2185815b0004018cc4c5261f7be1d6936c9fcd22
parent 44a1f3a6f36d9695029a5134a8ffd2809228d5e9
Author: Michael F. Schönitzer <michael@schoenitzer.de>
Date:   Fri, 27 Jul 2018 02:46:12 +0200

Fix problem with open swap-file

Diffstat:
Mautoload/vimwiki/base.vim | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim @@ -720,19 +720,19 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...) " This hack is necessary because apparently Vim messes up the result of " getpos() directly after this command. Strange. if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p'))) - try - if &autowriteall && !&hidden " in this case, the file is saved before switching to the - " new buffer. This causes Vim to show two messages in the command line which triggers - " the annoying hit-enter prompt. Solution: show no messages at all. - silent execute a:command fname - else + if &autowriteall && !&hidden " in this case, the file is saved before switching to the + " new buffer. This causes Vim to show two messages in the command line which triggers + " the annoying hit-enter prompt. Solution: show no messages at all. + silent execute a:command fname + else + try execute a:command fname - endif - catch /E37:/ - echomsg 'Vimwiki: The current file is modified. Hint: Take a look at' - \ ''':h g:vimwiki_autowriteall'' to see how to save automatically.' - return - endtry + catch /E37:/ + echomsg 'Vimwiki: The current file is modified. Hint: Take a look at' + \ ''':h g:vimwiki_autowriteall'' to see how to save automatically.' + return + endtry + endif " If the opened file was not already loaded by Vim, an autocommand is " triggered at this point