User expierience and UI design reworking #13
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/progress"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
render_with_prompt appends its "> {prompt}" line after render()'s own per-line Clear(ClearType::UntilNewLine) treatment (added when the redraw- flicker fix replaced the old upfront whole-block clear with per-line trims), but that appended line was never given a trim of its own. A Backspace/Delete that shortens the prompt left the previous, longer string's tail visible on screen, since nothing was clearing it anymore - the old upfront clear used to blank it by accident, not by design. Adds a Clear(ClearType::UntilNewLine) right after printing the prompt line, same discipline as every other line render() prints. Also fixes a stale doc-comment reference to erase_lines, which Stage 3 task 4 already renamed to move_to_frame_start.Now that input_cursor can be anywhere in input_buf (not just the end), leaving the real terminal cursor wherever the last Print landed it - always the end of the printed line - would make editing anywhere but the end invisible, effectively blind-editing. render_with_prompt takes a new PromptState { text, cursor } parameter (bundled to stay under clippy's too-many-arguments limit, same fix list.rs already used for EraseInput) instead of a bare &str, and moves the real cursor left by the character count between it and the end of the line after printing. MoveLeft(0) is skipped deliberately, since some terminals treat a 0 count the same as an absent one.