Files
ghostty/src/terminal
Jon Parise 82756f8b4c terminal: handle consecutive .input's in clearPrompt
Our semantic prompts are row-based, so the last prompt marker set on a
row "wins". In the case of at least our bash shell integration, this
means that consecutive prompt lines will all be marked as .input (OSC
133;B -- end-of-prompt, start of input).

Previously, clearPrompt() identified the current prompt's "area" by
searching upward from the current row until it encounters a .prompt
marker or some command output. In the bash case, .prompt is never the
dominant ("last") marker, so clearPrompt() would aggressively clear all
immediately preceding consecutive prompts.

With this change, we'll stop searching upwards when we encounter some
command output, a .prompt marker, _or another .input marker_. That last
case prevents clearPrompt() from unintentionally clearing earlier prompt
lines.

There may be improvements we can make to the way that our bash shell
integration emits semantic prompt markers, but I think this logic is
generally sound for all cases, and it specifically improves the current
bash prompt-clearing experience.
2024-12-16 21:06:15 -08:00
..
2024-08-21 09:45:47 -04:00
2024-12-03 15:53:12 -08:00
2024-06-24 15:16:24 -07:00
2024-08-05 13:56:57 +02:00
2024-12-04 12:38:40 -08:00
2024-03-22 20:28:05 -07:00
2024-06-24 15:16:24 -07:00