From 0ff13a6a5a0a4d534f4ce9619fa4ccb02f126d53 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 5 Oct 2023 08:39:23 +0200 Subject: 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 --- runtime/autoload/netrw.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 2dd5cf45bf..2ed3e9ca39 100644 --- 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("")) " call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("")) - 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("")) - exe "bd! ".a:bufid + exe "sil! bd! ".a:bufid endif " call Dret("s:NetrwBufRemover") -- cgit