Skip to content

fix(tui): handle Home and End keys in prompt input#31489

Open
lichuang wants to merge 1 commit into
anomalyco:devfrom
lichuang:fix-home-end-key
Open

fix(tui): handle Home and End keys in prompt input#31489
lichuang wants to merge 1 commit into
anomalyco:devfrom
lichuang:fix-home-end-key

Conversation

@lichuang

@lichuang lichuang commented Jun 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #27661

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The Home and End keys did not navigate to the start/end of text in the prompt textarea. Add explicit handling in onKeyDown to move the cursor to buffer start (Home) and buffer end (End).

How did you verify your code works?

Verified by running bun dev and pressing Home/End in the prompt input — cursor now jumps to the beginning and end of the text as expected.

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #19135: fix(opencode): restore Home/End prompt navigation in TUI
#19135

This PR appears to be directly related—it specifically addresses Home/End key navigation in the TUI prompt, which is the same functionality being fixed in the current PR #31489. This could indicate:

  • The fix was previously implemented but regressed
  • The earlier fix needs to be revisited or completed
  • There may be related context in that PR's discussion about how Home/End navigation should work

You should check PR #19135 to understand the prior implementation and why the issue (#27661) may have reappeared.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[Bug] Home/End keys in input box scroll message list instead of moving cursor

1 participant