canola.nvim/lua/oil
Barrett Ruth fe16993262
fix(preview): prevent preview from re-initializing modified oil buffers (#12)
Problem: when the preview window opens a directory that already has a
loaded oil buffer with unsaved edits, open_preview() unconditionally
calls load_oil_buffer() on it. This re-initializes the buffer via
view.initialize() -> render_buffer_async(), which re-fetches the
directory listing from disk and replaces all buffer lines, destroying
the user's pending edits. The mutation parser then can't see the
deleted entry in the source buffer, so it produces a COPY action
instead of a MOVE.

Solution: guard the load_oil_buffer() call in open_preview() with a
check for vim.b[filebufnr].oil_ready. Buffers that are already
initialized and rendered are not re-loaded, preserving any unsaved
modifications the user has made.

Closes: stevearc/oil.nvim#632
2026-02-21 02:43:59 -05:00
..
adapters feat: add configurable file and directory creation permissions 2026-02-20 20:26:07 -05:00
lsp fix: handle empty LSP glob patterns (#702) 2025-12-29 12:27:20 -08:00
mutator feat: pass entry to is_hidden_file and is_always_hidden callbacks 2026-02-20 16:29:08 -05:00
actions.lua feat(actions): add close_float to close only floating oil windows 2026-02-20 20:26:08 -05:00
cache.lua doc: disable some type warnings from new LuaLS release 2024-09-30 22:10:36 -07:00
clipboard.lua feat(clipboard): pasting from system clipboard can delete original (cut) (#649) 2025-10-15 10:36:37 -07:00
columns.lua feat(icon): add opt-in filetype detection via file contents 2026-02-20 20:26:07 -05:00
config.lua fix(ci): format 2026-02-20 20:27:55 -05:00
constants.lua lint: use more specific type for internal entries 2025-10-15 10:42:52 -07:00
fs.lua feat: add configurable file and directory creation permissions 2026-02-20 20:26:07 -05:00
git.lua fix: git mv errors when moving empty directory (#358) 2024-04-23 19:31:54 -07:00
init.lua fix(preview): prevent preview from re-initializing modified oil buffers (#12) 2026-02-21 02:43:59 -05:00
keymap_util.lua feat: add support for column text alignment (#711) 2026-01-13 21:28:16 -08:00
layout.lua feat: floating window max width/height can be percentages (#553) 2025-01-07 19:07:22 -08:00
loading.lua feat: add support for column text alignment (#711) 2026-01-13 21:28:16 -08:00
log.lua fix: gracefully handle fs_stat failures (#558) 2025-01-12 14:29:46 -08:00
pathutil.lua fix: can view drives on Windows 2023-11-05 07:27:28 -08:00
ringbuf.lua fix: spurious exits from faulty :wq detection (#221) 2024-03-12 15:57:57 -07:00
shell.lua debug: include shell command in error message 2024-11-25 09:10:33 -08:00
util.lua fix: resolve pre-existing LuaLS typecheck warnings 2026-02-20 20:34:59 -05:00
view.lua fix: move opts cast after second tbl_deep_extend in render_buffer_async 2026-02-20 20:51:39 -05:00