commit 0ff13a6a5a0a4d534f4ce9619fa4ccb02f126d53
parent 5f4f83ba322d2642d485669ecf762b629241d9dc
Author: Christian Clason <c.clason@uni-graz.at>
Date: Thu, 5 Oct 2023 08:39:23 +0200
vim-patch:4dbb2669e9ed
runtime(netrw): error when trying to :bd unloaded buffer
closes: vim/vim#13215
closes: vim/vim#13082
https://github.com/vim/vim/commit/4dbb2669e9ed9ec6864705dcb569715e417e1303
Co-authored-by: yasuda <yasuda@kyoto-sr.co.jp>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
@@ -11934,9 +11934,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")