Skip to content

[FEATURE] Allow separate terminal width during diff vs idle #242

@mightreya

Description

@mightreya

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions