Skip to content

Commit b30bcd5

Browse files
committed
docs: add note for on_unsaved_changes discard behavior
1 parent 0449986 commit b30bcd5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ For deep technical details, see [ARCHITECTURE.md](./ARCHITECTURE.md).
281281
vertical_split = true,
282282
open_in_current_tab = true,
283283
keep_terminal_focus = false, -- If true, moves focus back to terminal after diff opens
284-
on_unsaved_changes = "error" -- "error" or "discard"
284+
on_unsaved_changes = "error" -- "error" or "discard" (discard uses :edit! to reload the file and will lose unsaved changes)
285285
},
286286
},
287287
keys = {

lua/claudecode/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ M.defaults = {
2626
keep_terminal_focus = false, -- If true, moves focus back to terminal after diff opens
2727
hide_terminal_in_new_tab = false, -- If true and opening in a new tab, do not show Claude terminal there
2828
on_new_file_reject = "keep_empty", -- "keep_empty" leaves an empty buffer; "close_window" closes the placeholder split
29-
on_unsaved_changes = "error", -- "error", "discard" - How to handle unsaved changes when creating diffs
29+
on_unsaved_changes = "error", -- "error", "discard" (discard uses :edit! to reload the file and will lose unsaved changes)
3030
},
3131
models = {
3232
{ name = "Claude Opus 4.1 (Latest)", value = "opus" },

0 commit comments

Comments
 (0)