fix: restore buflisted on jumplist buffer re-entry
Problem: Neovim's jumplist machinery re-enters canola buffers via an internal `:edit`-equivalent path, which unconditionally sets `buflisted = true`. The existing workaround in `open()` and `open_float()` only covers canola-initiated navigation, leaving `<C-o>` and `<C-i>` unhandled. Solution: Apply the same `buf_options.buflisted` guard in the `BufEnter` autocmd, directly after `set_win_options()`. This fires on every buffer entry — including all jumplist paths — and mirrors the pattern already used at the two `:edit` callsites.
This commit is contained in:
parent
c3de0004d1
commit
a078bcf53c
1 changed files with 3 additions and 0 deletions
|
|
@ -1343,6 +1343,9 @@ M.setup = function(opts)
|
|||
vim.fn.setreg('#', orig_buffer)
|
||||
end
|
||||
view.set_win_options()
|
||||
if config.buf_options.buflisted ~= nil then
|
||||
vim.api.nvim_set_option_value('buflisted', config.buf_options.buflisted, { buf = 0 })
|
||||
end
|
||||
vim.w.canola_did_enter = true
|
||||
elseif vim.fn.isdirectory(bufname) == 0 then
|
||||
-- Only run this logic if we are *not* in an canola buffer (and it's not a directory, which
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue