mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 23:44:59 +02:00
Multi-line processing of bash prompts should only be done when the prompt actually contains a newline
This commit is contained in:
@@ -52,7 +52,7 @@ _ksi_main() {
|
|||||||
if [[ -n "${_ksi_prompt[ps1]}" ]]; then
|
if [[ -n "${_ksi_prompt[ps1]}" ]]; then
|
||||||
PS1=${PS1//\\\[\\e\]133;k;start_kitty\\a\\\]*end_kitty\\a\\\]}
|
PS1=${PS1//\\\[\\e\]133;k;start_kitty\\a\\\]*end_kitty\\a\\\]}
|
||||||
PS1="${_ksi_prompt[ps1]}$PS1"
|
PS1="${_ksi_prompt[ps1]}$PS1"
|
||||||
if [[ "${_ksi_prompt[mark]}" == "y" ]]; then
|
if [[ "${_ksi_prompt[mark]}" == "y" && "${PS1}" == *$'\n'* ]]; then
|
||||||
# bash does not redraw the leading lines in a multiline prompt so
|
# bash does not redraw the leading lines in a multiline prompt so
|
||||||
# mark the last line as a secondary prompt. Otherwise on resize the
|
# mark the last line as a secondary prompt. Otherwise on resize the
|
||||||
# lines before the last line will be erased by kitty.
|
# lines before the last line will be erased by kitty.
|
||||||
|
|||||||
Reference in New Issue
Block a user