[PR #6465] fix(opentui): prevent crash on Up arrow with empty history #11919

Open
opened 2026-02-16 18:16:51 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6465

State: open
Merged: No


Fixes #3414
Related: #3221

Pressing Up/Down arrow with empty input history crashes the TUI.

Changes:

  • Added explicit return type to history.move()
  • Changed implicit return to explicit return undefined
  • Added validation before using history items
  • Added regression tests
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6465 **State:** open **Merged:** No --- Fixes #3414 Related: #3221 Pressing Up/Down arrow with empty input history crashes the TUI. Changes: - Added explicit return type to `history.move()` - Changed implicit `return` to explicit `return undefined` - Added validation before using history items - Added regression tests
yindo added the pull-request label 2026-02-16 18:16:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11919