From 873d505e5bfdd65317ea97ead8faa6c56bac04c0 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 14 Nov 2023 22:41:39 -0800 Subject: [PATCH] fix: don't set buflisted on oil buffers (#220) --- lua/oil/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/oil/init.lua b/lua/oil/init.lua index 3181191e..700626fe 100644 --- a/lua/oil/init.lua +++ b/lua/oil/init.lua @@ -574,8 +574,9 @@ M.select = function(opts, callback) vim.bo[filebufnr].bufhidden = "wipe" vim.b[filebufnr].oil_preview_buffer = true end - else + elseif not vim.endswith(normalized_url, "/") then -- The :buffer command doesn't set buflisted=true + -- So do that for non-diretory-buffers vim.bo[filebufnr].buflisted = true end