preview.nvim/lua/preview
Barrett Ruth 272153a158
fix(compiler): use BufDelete instead of BufUnload for cleanup (#59)
Problem: `:e` (edit/reload) fires `BufUnload`, which tears down the
entire preview — process, watchers, and viewer — even though the user
is just reloading the current buffer.

Solution: Switch the cleanup autocmd from `BufUnload` to `BufDelete`,
which only fires on `:bdelete` and `:bwipeout`. Guard `nvim_del_autocmd`
calls with `pcall` in cleanup paths since buffer-local autocmds may
already be gone when the buffer is wiped before `stop_watching` runs.

Closes #57
2026-03-12 16:52:26 -04:00
..
commands.lua fix: lifecycle cleanup and defensive runtime checks (#29) 2026-03-04 14:02:16 -05:00
compiler.lua fix(compiler): use BufDelete instead of BufUnload for cleanup (#59) 2026-03-12 16:52:26 -04:00
diagnostic.lua feat: compile notifications and long-running provider feedback (#55) 2026-03-06 14:58:10 -05:00
health.lua feat: rename watch → toggle, auto-compile on start, built-in opener 2026-03-02 23:37:44 -05:00
init.lua feat: add extra_args provider field (#51) 2026-03-05 22:26:28 -05:00
log.lua feat: rename 2026-03-02 21:23:40 -05:00
presets.lua feat: compile notifications and long-running provider feedback (#55) 2026-03-06 14:58:10 -05:00
reload.lua fix(reload): bind SSE server to port 0 for OS-assigned port (#21) 2026-03-03 17:46:04 -05:00