Improve text input editing and Unicode width handling
Problem
The shared LineInput currently supports character insertion, backspace, left, and right only. Search popups use a separate append-and-pop string implementation.
The input widgets do not provide delete, home/end, word navigation, paste handling, or a horizontal viewport for long values. Cursor movement is based on Rust char values rather than grapheme clusters and terminal display width.
Issue #430 requests a search insert mode, and #851 reports emoji-related layout problems. Neither tracks the shared editing and display-width behavior described here.
Expected behavior
Search and form inputs should offer consistent keyboard editing and keep the cursor visible for long or Unicode text.
Suggested approach
Use one shared input model based on grapheme boundaries and terminal display width. Reuse it for search popups, the search page, and playlist creation.
Acceptance criteria
- Delete, home, end, and common word-navigation keys work consistently.
- Bracketed paste or terminal paste input is handled.
- Long input scrolls horizontally to keep the cursor visible.
- Emoji, combining marks, and CJK text do not split incorrectly during editing.
- Search and playlist inputs use the same editing behavior.
- Unit and render tests cover narrow terminal widths and Unicode cases.
Source: aome510/spotify-player