Summary
Currently terminal.split_width_percentage controls the Claude terminal width both when idle and when a diff is open. This couples two preferences that, for me at least, want different values: I like a wide terminal (~50%) when chatting, but want it shrunk (~30%) while reviewing a diff so the diff has more room.
Proposal
Add an optional second config:
terminal = {
split_width_percentage = 0.5, -- idle width (existing)
diff_split_width_percentage = 0.3, -- new: width while a diff is active
}
Behavior:
- If
diff_split_width_percentage is unset (default nil), keep current single-width behavior.
- If set: shrink the terminal to that percentage when a diff opens (in
_create_diff_view_from_window), and restore to split_width_percentage when the diff closes (already handled in _cleanup_diff_state).
Context
I've been doing this locally via a monkey patch on _create_diff_view_from_window, and several other users with monkey-patched configs in the wild are doing the same thing. Worth promoting to a real config option.
Happy to open a PR if there's interest.
Summary
Currently
terminal.split_width_percentagecontrols the Claude terminal width both when idle and when a diff is open. This couples two preferences that, for me at least, want different values: I like a wide terminal (~50%) when chatting, but want it shrunk (~30%) while reviewing a diff so the diff has more room.Proposal
Add an optional second config:
Behavior:
diff_split_width_percentageis unset (defaultnil), keep current single-width behavior._create_diff_view_from_window), and restore tosplit_width_percentagewhen the diff closes (already handled in_cleanup_diff_state).Context
I've been doing this locally via a monkey patch on
_create_diff_view_from_window, and several other users with monkey-patched configs in the wild are doing the same thing. Worth promoting to a real config option.Happy to open a PR if there's interest.