runtime(netrw): error when trying to :bd unloaded buffer Commit: https://github.com/vim/vim/commit/4dbb2669e9ed9ec6864705dcb569715e417e1303 Author: yasuda <yas...@kyoto-sr.co.jp> Date: Wed Oct 4 20:50:35 2023 +0200
runtime(netrw): error when trying to :bd unloaded buffer closes: https://github.com/vim/vim/issues/13215 closes: https://github.com/vim/vim/issues/13082 Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 9548b4937..290a0509b 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -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") -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1qo76J-007lp4-Q3%40256bit.org.