fix(select): redraw screen after buffer switch (#106)

* fix(select): redraw screen after buffer switch

Problem: `select` opens files inside a `vim.schedule_wrap` callback
from `normalize_url`. Scheduled `FileType` autocmds (e.g. treesitter
parsing) queue onto the same batch, blocking the screen update. The
oil buffer stays visible until the heavy work finishes.

Solution: call `vim.cmd.redraw()` after the buffer switch to flush
the screen before any queued scheduled callbacks run. Matches the
behavior of plain `:e`.

* docs(upstream): mark #699 fixed (#106)
This commit is contained in:
Barrett Ruth 2026-03-09 17:40:19 -04:00 committed by GitHub
parent 03c2ac4bd5
commit 39374ee99b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -899,6 +899,7 @@ M.select = function(opts, callback)
end
end
vim.cmd.redraw()
open_next_entry(cb)
end)
end