Skip to content

Commit

Permalink
Don't catch errors when executing "storage#put_cmd"
Browse files Browse the repository at this point in the history
  • Loading branch information
boechat107 committed Aug 12, 2020
1 parent 55a9da2 commit 3fa4a4f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions autoload/storage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@ function! storage#write(cmd, dict, path) abort
silent execute 'normal ggdd'
silent execute 'write'
setlocal nobuflisted
try
echo storage#put_cmd(a:cmd, tempfile, a:path)
catch
finally
silent execute 'edit' fnameescape(a:path)
endtry
" NOTE:
" Expected to be still 'modified' if storage#put_cmd failed

echo storage#put_cmd(a:cmd, tempfile, a:path)

silent execute 'edit' fnameescape(a:path)
setlocal nomodified
let &hidden = current_hidden
endfunction
Expand Down

0 comments on commit 3fa4a4f

Please sign in to comment.