From 9202e2c80cea8da009b9c31cf9e0aa204e06397d Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Sat, 27 Jun 2026 13:08:28 -0500 Subject: fix(dir): respect directory buffer lifetime #40453 Problem: dir.lua leaves previously-navigated directory buffers around. This is fine by default, but users need a simple way to opt out. Solution: 1. Respect `set hidden` (via `'bufhidden'`) as one way to make previously-navigated dir buffers from showing up. 2. Document a one-liner to hide these buffers --- runtime/lua/nvim/dir.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/lua/nvim/dir.lua') diff --git a/runtime/lua/nvim/dir.lua b/runtime/lua/nvim/dir.lua index fc3ca6c73f..3d2eff4d9b 100644 --- a/runtime/lua/nvim/dir.lua +++ b/runtime/lua/nvim/dir.lua @@ -85,7 +85,6 @@ local function render(buf, dir) not set_buf_options(buf, { { 'modeline', false }, { 'buftype', 'nowrite' }, - { 'bufhidden', 'hide' }, { 'buflisted', true }, { 'swapfile', false }, { 'readonly', false }, -- cgit