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:
yasuda
2023-10-04 20:50:35 +02:00
committed by Christian Brabandt
parent 64885645e7
commit 4dbb2669e9

View File

@ -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")