Skip to content

Fix editor#14

Open
yumosx wants to merge 2 commits intomainfrom
fix-editor
Open

Fix editor#14
yumosx wants to merge 2 commits intomainfrom
fix-editor

Conversation

@yumosx
Copy link
Member

@yumosx yumosx commented Feb 13, 2026

No description provided.

- Add truncation logic for displayText when it exceeds contentWidth
- Skip ANSI escape sequences during width calculation to preserve formatting
- Implement character-by-character truncation using runeWidth for accurate width measurement
- Add final safety check to ensure rendered line doesn't exceed terminal width
- Use fasttui.TruncateToWidth as fallback to guarantee output fits within bounds
- Prevents text wrapping and display corruption on narrow terminals
- Remove unused "fmt" import
- Remove debug print statement from editor callback
- Clean up unnecessary blank line in callback function
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