mirror of
https://github.com/atuinsh/atuin.git
synced 2025-01-01 03:51:12 +01:00
fix(bash/preexec): erase the prompt last line before Bash renders it
Fixes https://github.com/atuinsh/atuin/issues/1668 When the prompt becomes longer after "enter_accept", Bash still uses the previous shorter prompt, so the extra characters in the new prompt drawn by Atuin is left in the terminal display. In this patch, we remove the last line of the prompt drawn by Atuin so that it doesn't interfere with the last line of the prompt drawn by Bash.
This commit is contained in:
parent
374255dd58
commit
b00887562b
@ -158,7 +158,7 @@ __atuin_accept_line() {
|
||||
# so to work for a multiline prompt we need to print it ourselves,
|
||||
# then go to the beginning of the last line.
|
||||
__atuin_evaluate_prompt
|
||||
printf '%s\r' "$__atuin_prompt"
|
||||
printf '%s\r%s' "$__atuin_prompt" "$(tput el)"
|
||||
}
|
||||
|
||||
__atuin_history() {
|
||||
|
Loading…
Reference in New Issue
Block a user