You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,32 @@ Enable detailed authentication logging by setting:
253
253
254
254
```lua
255
255
require("claudecode").setup({
256
-
log_level="debug" -- Shows auth token generation, validation, and failures
256
+
log_level="debug", -- Shows auth token generation, validation, and failures
257
+
diff_opts= {
258
+
keep_terminal_focus=true, -- If true, moves focus back to terminal after diff opens
259
+
},
260
+
})
261
+
```
262
+
263
+
### Configuration Options
264
+
265
+
#### Diff Options
266
+
267
+
The `diff_opts` configuration allows you to customize diff behavior:
268
+
269
+
-`keep_terminal_focus` (boolean, default: `false`) - When enabled, keeps focus in the Claude Code terminal when a diff opens instead of moving focus to the diff buffer. This allows you to continue using terminal keybindings like `<CR>` for accepting/rejecting diffs without accidentally triggering other mappings.
270
+
271
+
**Example use case**: If you frequently use `<CR>` or arrow keys in the Claude Code terminal to accept/reject diffs, enable this option to prevent focus from moving to the diff buffer where `<CR>` might trigger unintended actions.
272
+
273
+
```lua
274
+
require("claudecode").setup({
275
+
diff_opts= {
276
+
keep_terminal_focus=true, -- If true, moves focus back to terminal after diff opens
0 commit comments