diff options
author | yasuda <yasuda@kyoto-sr.co.jp> | 2023-10-04 20:50:35 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-04 20:52:44 +0200 |
commit | 4dbb2669e9ed9ec6864705dcb569715e417e1303 (patch) | |
tree | 444aeca1b46308d7ccb684ecae81eb50fc5a498d /runtime | |
parent | 64885645e76b301a6c34fe762c4e29c7a0f63881 (diff) |
runtime(netrw): error when trying to :bd unloaded buffer
closes: #13215
closes: #13082
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/netrw.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 9548b49375..290a0509bd 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") |