Skip to content

Fix inconsistent bottom padding in split panes#529

Open
csmarshall wants to merge 1 commit into
gnachman:masterfrom
csmarshall:fix-pane-bottom-alignment
Open

Fix inconsistent bottom padding in split panes#529
csmarshall wants to merge 1 commit into
gnachman:masterfrom
csmarshall:fix-pane-bottom-alignment

Conversation

@csmarshall
Copy link
Copy Markdown

When a terminal window is split into panes, the text positioning is now calculated from the bottom up instead of top down. This ensures that all panes have consistent bottom padding equal to the configured margin (kPreferenceKeyTopBottomMargins), with any excess pixels that don't fit evenly into line heights placed at the top rather than the bottom.

Previously, integer division when calculating rows from height would place excess pixels at the bottom, causing visual misalignment between panes when heights didn't divide evenly by line height.

Changes:

  • Modified visibleRectExcludingTopMargin:startingAtRow: in PTYTextView.m to add a top offset equal to (excess - bottomMargin), aligning text from the bottom
  • Updated comments in the excess method to reflect its new usage for calculating top offset

🤖 Generated with Claude Code

When a terminal window is split into panes, the text positioning is now
calculated from the bottom up instead of top down. This ensures that all
panes have consistent bottom padding equal to the configured margin
(kPreferenceKeyTopBottomMargins), with any excess pixels that don't fit
evenly into line heights placed at the top rather than the bottom.

Previously, integer division when calculating rows from height would
place excess pixels at the bottom, causing visual misalignment between
panes when heights didn't divide evenly by line height.

Changes:
- Modified visibleRectExcludingTopMargin:startingAtRow: in PTYTextView.m
  to add a top offset equal to (excess - bottomMargin), aligning text
  from the bottom
- Updated comments in the excess method to reflect its new usage for
  calculating top offset

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gnachman
Copy link
Copy Markdown
Owner

I suspect this will cause many bugs. For example, anywhere that excess is used, because there is a widespread assumption that the excess area is at the bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants