Merge pull request #698 from jpmor/dev
Remove awa check triggering silent file edits.
This commit is contained in:
commit
b997e687c3
@ -826,22 +826,16 @@ function! vimwiki#base#edit_file(command, filename, anchor, ...)
|
|||||||
" This hack is necessary because apparently Vim messes up the result of
|
" This hack is necessary because apparently Vim messes up the result of
|
||||||
" getpos() directly after this command. Strange.
|
" getpos() directly after this command. Strange.
|
||||||
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
if !(a:command ==# ':e ' && vimwiki#path#is_equal(a:filename, expand('%:p')))
|
||||||
if &autowriteall && !&hidden " in this case, the file is saved before switching to the
|
try
|
||||||
" new buffer. This causes Vim to show two messages in the command line which triggers
|
execute a:command fname
|
||||||
" the annoying hit-enter prompt. Solution: show no messages at all.
|
catch /E37:/
|
||||||
silent execute a:command fname
|
echomsg 'Vimwiki: Can''t leave the current buffer, because it is modified. Hint: Take a look at'
|
||||||
else
|
\ ''':h g:vimwiki_autowriteall'' to see how to save automatically.'
|
||||||
try
|
return
|
||||||
execute a:command fname
|
catch /E325:/
|
||||||
catch /E37:/
|
echom 'Vimwiki: Vim couldn''t open the file, probably because a swapfile already exists. See :h E325.'
|
||||||
echomsg 'Vimwiki: Can''t leave the current buffer, because it is modified. Hint: Take a look at'
|
return
|
||||||
\ ''':h g:vimwiki_autowriteall'' to see how to save automatically.'
|
endtry
|
||||||
return
|
|
||||||
catch /E325:/
|
|
||||||
echom 'Vimwiki: Vim couldn''t open the file, probably because a swapfile already exists. See :h E325.'
|
|
||||||
return
|
|
||||||
endtry
|
|
||||||
endif
|
|
||||||
|
|
||||||
" If the opened file was not already loaded by Vim, an autocommand is
|
" If the opened file was not already loaded by Vim, an autocommand is
|
||||||
" triggered at this point
|
" triggered at this point
|
||||||
|
@ -3511,6 +3511,7 @@ New:~
|
|||||||
* PR #47: Optimize table formatting for large tables.
|
* PR #47: Optimize table formatting for large tables.
|
||||||
|
|
||||||
Removed:~
|
Removed:~
|
||||||
|
* PR #698: Remove awa check triggering silent file edits.
|
||||||
* Options g:vimwiki_use_mouse and g:vimwiki_table_mappings. These are
|
* Options g:vimwiki_use_mouse and g:vimwiki_table_mappings. These are
|
||||||
still present in the code for backwards compatibility but have been
|
still present in the code for backwards compatibility but have been
|
||||||
removed from the documentation and will be fully removed at a later
|
removed from the documentation and will be fully removed at a later
|
||||||
|
Loading…
Reference in New Issue
Block a user