From e6e2d8a71fb0c26e2439e5e8e18d0d9557be3061 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 9 Mar 2026 17:39:01 -0400 Subject: [PATCH] docs(upstream): mark #699 fixed (#106) --- doc/upstream.md | 2 +- lua/canola/init.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/upstream.md b/doc/upstream.md index a02e9b6..796e629 100644 --- a/doc/upstream.md +++ b/doc/upstream.md @@ -134,7 +134,7 @@ issues against this fork. | [#685](https://github.com/stevearc/oil.nvim/issues/685) | Plain directory paths in buffer names | not actionable — protocol prefix is fundamental to buffer identity | | [#690](https://github.com/stevearc/oil.nvim/issues/690) | `OilFileIcon` highlight group | fixed | | [#692](https://github.com/stevearc/oil.nvim/issues/692) | Keymap normalization | cherry-picked ([#725](https://github.com/stevearc/oil.nvim/pull/725)) | -| [#699](https://github.com/stevearc/oil.nvim/issues/699) | `select` blocks UI with slow FileType autocmd | open | +| [#699](https://github.com/stevearc/oil.nvim/issues/699) | `select` blocks UI with slow FileType autocmd | fixed ([#106](https://github.com/barrettruth/canola.nvim/pull/106)) | | [#707](https://github.com/stevearc/oil.nvim/issues/707) | Move file/dir into new dir by renaming | open | | [#710](https://github.com/stevearc/oil.nvim/issues/710) | buftype empty on BufEnter | fixed ([#10](https://github.com/barrettruth/canola.nvim/pull/10)) | | [#714](https://github.com/stevearc/oil.nvim/issues/714) | Support question | not actionable — answered | diff --git a/lua/canola/init.lua b/lua/canola/init.lua index 6c6f818..b5e9ad6 100644 --- a/lua/canola/init.lua +++ b/lua/canola/init.lua @@ -870,6 +870,8 @@ M.select = function(opts, callback) local filebufnr = vim.fn.bufadd(normalized_url) local entry_is_file = not vim.endswith(normalized_url, '/') + -- The :buffer command doesn't set buflisted=true + -- So do that for normal files or for canola dirs if config set buflisted=true if entry_is_file or config.buf_options.buflisted then vim.bo[filebufnr].buflisted = true end @@ -877,6 +879,7 @@ M.select = function(opts, callback) local cmd = 'buffer' if opts.tab then vim.cmd.tabnew({ mods = mods }) + -- Make sure the new buffer from tabnew gets cleaned up vim.bo.bufhidden = 'wipe' elseif opts.split then cmd = 'sbuffer' @@ -890,6 +893,7 @@ M.select = function(opts, callback) args = { filebufnr }, mods = mods, }) + -- Ignore swapfile errors if not ok and err and not err:match('^Vim:E325:') then vim.api.nvim_echo({ { err, 'Error' } }, true, {}) end