[BUG] Cursor "jumps" 1 position to the left after each @-search for a file with a long name #1944

Open
opened 2026-02-16 17:33:21 -05:00 by yindo · 2 comments
Owner

Originally created by @laSinteZ on GitHub (Oct 3, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Problem: after @-searching for 1 file with a long name (wider than your current chat width) cursor starts blinking on a "current" character position (instead of next). After adding one more file, cursor starts blinking on prev-to last. After 1 more file – prev-prev-to last.

Attached a demo:

https://github.com/user-attachments/assets/572c46d8-e528-4cb8-b79e-5e146ba7616d

I suspect it happens when a file name is longer than a "chat" window width.

Opencode: 0.14.1
Terminal: WezTerm 20240203-110809-5046fc22
System: macOS 15.6.1

No MCPs added/no modifications to any OpenCode config. Happens also on my Work laptop with a separate installation.

Repro: just create a very nested folder with a couple of files (/src/Pages/SomeVeryLongNamePage/Components/SomeLongComponent/SomeLongComponent.module.scss should be enough)

Originally created by @laSinteZ on GitHub (Oct 3, 2025). Originally assigned to: @adamdotdevin on GitHub. Problem: after `@`-searching for 1 file with a long name (wider than your current chat width) cursor starts blinking on a "current" character position (instead of next). After adding one more file, cursor starts blinking on prev-to last. After 1 more file – prev-prev-to last. Attached a demo: https://github.com/user-attachments/assets/572c46d8-e528-4cb8-b79e-5e146ba7616d I suspect it happens when a file name is longer than a "chat" window width. Opencode: 0.14.1 Terminal: WezTerm 20240203-110809-5046fc22 System: macOS 15.6.1 No MCPs added/no modifications to any OpenCode config. Happens also on my Work laptop with a separate installation. Repro: just create a very nested folder with a couple of files (`/src/Pages/SomeVeryLongNamePage/Components/SomeLongComponent/SomeLongComponent.module.scss` should be enough)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 3, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2791: Input area takes two lines, input cursor is above the text by one line in v0.11.4 (similar cursor positioning issues)
  • #2772: File search via @ symbol is very slow in large projects (related to @ file search functionality)
  • #2649: Standard keyboard cursor navigation (cursor navigation behavior issues)
  • #2688: Opencode freezes when pressing option + left arrow key on MacBook (input navigation issues)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 3, 2025): This issue might be a duplicate of existing issues. Please check: - #2791: Input area takes two lines, input cursor is above the text by one line in v0.11.4 (similar cursor positioning issues) - #2772: File search via @ symbol is very slow in large projects (related to @ file search functionality) - #2649: Standard keyboard cursor navigation (cursor navigation behavior issues) - #2688: Opencode freezes when pressing `option` + left arrow key on MacBook (input navigation issues) Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 3, 2025):

ah good callout thx, this should be fixed by the upcoming tui rewrite

@rekram1-node commented on GitHub (Oct 3, 2025): ah good callout thx, this should be fixed by the upcoming tui rewrite
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1944