motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit aa72be3a095107eb4e9a325caeab081b0148744c (tree)
parent 5676b909e9a355bdf8ca33fce90aa8eb362fd9d3
Author: Tim Pope <code@tpope.net>
Date:   Fri, 23 Oct 2009 14:02:01 -0400

Don't delete unloaded buffers in :Gwrite

Diffstat:
Mplugin/fugitive.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -708,7 +708,7 @@ function! s:Write(force,...) abort let two = s:repo().translate(':2:'.path) let three = s:repo().translate(':3:'.path) for nr in range(1,bufnr('$')) - if !getbufvar(nr,'&modified') && (bufname(nr) == one || bufname(nr) == two || bufname(nr) == three) + if bufloaded(nr) && !getbufvar(nr,'&modified') && (bufname(nr) == one || bufname(nr) == two || bufname(nr) == three) execute nr.'bdelete' endif endfor