Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lua/claudecode/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,11 @@ local function register_diff_autocmds(tab_name, new_buffer)
buffer = new_buffer,
callback = function()
M._resolve_diff_as_saved(tab_name, new_buffer)
-- Explicitly turn off diff mode before Neovim does its post-write redraw.
-- This prevents a crash (exit code 139) when render-markdown.nvim is installed
-- and the diff involves a new file. Without this, the post-callback redraw
-- triggers render-markdown on a buffer still in diff mode, causing a segfault.
pcall(vim.cmd, "diffoff")
-- Prevent actual file write since we're handling it through MCP
return true
end,
Expand Down