mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
Scroll up into the scrollback and type: the characters went to the shell, the prompt line grew, and the viewport did not move. Nothing on screen changed, so the pane read as having stopped listening — while it was in fact accepting every keystroke somewhere the user could not see. `commit_text` has three branches and only the last one jumped to the prompt: the one taken when tty7 is *not* driving the line. At a shell prompt with OSC 133 reporting — the normal case, and the one the editor features exist for — the text goes into `cmd` and returned early. Same for a reverse-search query. `handle_editor_key` has always jumped, so the two halves of the same editor disagreed: Left and Backspace came back to the prompt and the letters between them did not. Hoisted the jump above all three branches, where it describes the whole function: text typed goes to the prompt, so the view has to be looking at the prompt. Held by a test that fails on the old order. Verified in a dev window: 200 lines printed, scrolled 15 notches back, typed — the grid snaps to the prompt with the characters on it.