Skip to content

Fix task input cursor escaping into the Activity panel on overflow - #2

Open
rohittcodes wants to merge 1 commit into
mainfrom
fix-input-cursor-overflow
Open

Fix task input cursor escaping into the Activity panel on overflow#2
rohittcodes wants to merge 1 commit into
mainfrom
fix-input-cursor-overflow

Conversation

@rohittcodes

Copy link
Copy Markdown
Owner

Summary

  • The task input box is a fixed-height widget, but the terminal cursor position wasn't clamped to it — once typed content overflowed the box's visible rows, the cursor row kept incrementing past the bottom border and visually landed inside the Activity panel below (ratatui clips rendered widget content to its Rect, but not the separate global terminal cursor)
  • Added auto-scroll (Paragraph::scroll) so the cursor's line always stays within the box's visible rows, and a defensive column clamp for one long unbroken word that word-wrap can't break

Test plan

  • cargo check / cargo build clean
  • Manual: cargo run, press i, type/Shift+Enter past 4 lines, confirm the cursor stays inside the input box instead of drifting into Activity

🤖 Generated with Claude Code

The input box is a fixed-height widget, but the terminal cursor position
wasn't clamped to it. Once typed content (via Shift+Enter newlines or a
long wrapped line) exceeded the box's visible rows, the cursor row kept
incrementing past the box's bottom border. Ratatui clips rendered widget
content to its own Rect, but the terminal cursor is a separate global
position it does not clip - so the cursor visually landed inside the
Activity panel below instead of staying inside the input box.

Add auto-scroll (Paragraph::scroll) so the cursor's line always stays
within the box's visible rows, and clamp the cursor's column defensively
for the edge case of one long unbroken word that word-wrap can't break.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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