Merge pull request #940 from l0ng-ai/feat/767-prompt-input-new-line

feat(prompt-editor): start input on its own row when the prompt leaves too little room
This commit is contained in:
l0ng-ai
2026-09-23 16:58:08 +08:00
committed by GitHub
3 changed files with 188 additions and 33 deletions
+7
View File
@@ -98,6 +98,13 @@ A command that wraps, or one you deliberately break across lines, edits in
place. The grid shifts to keep the caret visible instead of scrolling the whole
screen away.
When the prompt itself takes up most of the row — a deep working directory, a
busy theme — the line you type starts on the row below it instead, with the
full width of the pane. That happens once the prompt leaves fewer than a third
of the columns (never fewer than 20); an ordinary prompt keeps the input beside
it. To keep the prompt short instead, trim it in the shell: `%2~` in a zsh
`PROMPT`, fish's `prompt_pwd`, or starship's `truncation_length`.
| | |
|---|---|
| <kbd>⇧ ⏎</kbd> · <kbd>⌥ ⏎</kbd> | Insert a newline instead of submitting |