mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
runtime(netrw): error when trying to :bd unloaded buffer
closes: #13215 closes: #13082 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
64885645e7
commit
4dbb2669e9
@ -12044,9 +12044,9 @@ fun! s:NetrwBufRemover(bufid)
|
||||
" call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("<slnum>"))
|
||||
" call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("<slnum>"))
|
||||
|
||||
if a:bufid > 1 && !buflisted(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1
|
||||
if a:bufid > 1 && !buflisted(a:bufid) && bufloaded(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1
|
||||
" call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("<slnum>"))
|
||||
exe "bd! ".a:bufid
|
||||
exe "sil! bd! ".a:bufid
|
||||
endif
|
||||
|
||||
" call Dret("s:NetrwBufRemover")
|
||||
|
Reference in New Issue
Block a user