Skip to content

fix: disable custom cursor rendering to fix layout issues#25

Closed
randlee wants to merge 2 commits intodevelopfrom
feature/fix-terminal-prompt-env-vars
Closed

fix: disable custom cursor rendering to fix layout issues#25
randlee wants to merge 2 commits intodevelopfrom
feature/fix-terminal-prompt-env-vars

Conversation

@randlee
Copy link
Owner

@randlee randlee commented Jan 30, 2026

Summary

  • Disable custom cursor rendering that was causing layout issues with TUI applications
  • The cursor was appearing in the wrong position (below the status line) in Claude Code
  • Add supporting infrastructure (display_offset, line_offset, viewport_rows) for future proper cursor implementation

Changes

  • Add display_offset, line_offset, viewport_rows to TerminalContentSnapshot
  • Improve build_lines_from_content to handle non-zero starting line indices
  • Disable custom cursor rendering with TODO for future implementation

Test plan

  • Regular shell prompt displays correctly with visible cursor
  • Claude Code UI renders without extra empty lines or mispositioned cursor
  • Divider drag still works correctly

🤖 Generated with Claude Code

randlee and others added 2 commits January 30, 2026 13:45
Two issues fixed:

1. Added mouse event handlers to divider element
   - on_mouse_move to track drag position
   - on_mouse_up to end drag
   Previously events were only on parent, but mouse moves off divider during drag

2. Fixed calculate_new_ratios ratio calculation
   - Was incorrectly assuming ratios sum to 1.0 (visible_ratio_total = 1.0 - hidden)
   - Actually ratios are [1.0, 2.0, 1.0] summing to 4.0
   - Now correctly sums visible ratios for proper width calculation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The custom cursor rendering was causing layout problems, particularly
with TUI applications like Claude Code where the cursor appeared in
the wrong position (below the status line) and caused the UI to shift.

Changes:
- Add display_offset, line_offset, viewport_rows to TerminalContentSnapshot
- Improve build_lines_from_content to handle non-zero starting line indices
- Disable custom cursor rendering (TODO: implement proper cursor following
  Zed's terminal_element.rs approach)

The terminal content from alacritty already handles cursor visualization
through cell attributes, so disabling the custom cursor overlay provides
a better user experience until proper cursor rendering is implemented.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@randlee
Copy link
Owner Author

randlee commented Jan 31, 2026

Superseded by PR #26 which targets develop directly with cursor rendering disabled as a workaround.

@randlee randlee closed this Jan 31, 2026
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.

1 participant