Commit f99b66f
committed
fix(repl): invisible typed input in REPL editor
Bug: redrawFromCursor() printed line[e.pos:] after the cursor had
already been advanced past the newly inserted/deleted character.
When typing at end of line (the common case), line[e.pos:] was empty
— so no character was ever rendered to the terminal.
Fix: replace the partial redraw (print line[e.pos:] + clear + cursor
moveback) with a full drawLine() call. drawLine() does \r + prompt +
full line text + clear-to-end + cursor positioning, which always
shows the complete buffer regardless of cursor position.
Affects: insert, backspace, delete, deleteLine, deleteToEnd,
historyPrev, historyNext — every editing operation.1 parent 1be1482 commit f99b66f
1 file changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
361 | 364 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 365 | + | |
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
| |||
0 commit comments