Skip to content

Commit

Permalink
Vim.Buffer: Use 'silent' and 'fnameescape'
Browse files Browse the repository at this point in the history
fnameescape() is required while tempfile might contains
backslash in Windows.

silent is added while the line is for removing 'tempfile'
from unlisted-buffer which is not a core part of the
function (#439)

Fix lambdalisue/vim-gista#81
  • Loading branch information
lambdalisue committed Jan 13, 2017
1 parent 46ba78d commit 854ce5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/vital/__vital__/Vim/Buffer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ function! s:read_content(content, ...) abort
\)
finally
call delete(tempfile)
execute 'bwipeout!' tempfile
" To remove 'tempfile' from unlisted-buffer #439
silent execute 'bwipeout!' fnameescape(tempfile)
endtry
endfunction

Expand Down

0 comments on commit 854ce5a

Please sign in to comment.