mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
891067a7f7
The chat input uses a transparent-textarea-over-overlay pattern where visible text comes from the overlay div but the cursor follows the textarea. Ghost text only exists in the overlay, so when it's long enough to trigger wrapping, the browser re-wraps preceding visible text — but the cursor doesn't move because the textarea has no ghost text. Make the ghost text span an atomic inline box (display: inline-flex) so it either fits on the current line or wraps to the next line as a unit, without pulling preceding words with it. This matches the legacy extension behavior where the wrapping difference was hidden by the inverted z-order (overlay text was transparent there).