Commit a7640b2
committed
fix(cli): fix Prompt.text clear when input wraps terminal lines
When the user's input in `Prompt.text` exceeds the terminal width and
wraps to a new line, `renderClearScreen` miscalculates lines to erase
because it only considers `options.message`, not the full rendered line
including the input value.
This causes duplicate prompt lines to be printed on each keystroke after
the text wraps.
The fix calculates the full rendered line length:
`"? " + message + " › " + inputValue`
This is the same root cause as #5978 (for Prompt.select), and applies
the equivalent fix to Prompt.text.
Closes #59781 parent 7b8165f commit a7640b2
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
0 commit comments