diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2020-11-10 11:59:41 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2020-11-10 11:59:41 +0300 |
commit | 271836403d61b92019b877f37d094c4d235b818d (patch) | |
tree | 65c605f337b6f137b71a764e6ea57f5fe8a51ca4 /internal | |
parent | e2db8607456eb04186b84fc6edaaf567350e3dc0 (diff) |
remove artificial term scrolling before instant prompt
Diffstat (limited to 'internal')
-rw-r--r-- | internal/p10k.zsh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 4e4a5068..845bd970 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7372,10 +7372,11 @@ function _p9k_on_widget_zle-line-finish() { (( _p9k_reset_on_line_finish )) && __p9k_reset_state=2 (( $+functions[p10k-on-post-prompt] )) && p10k-on-post-prompt + local -i optimized + if [[ -n $_p9k_transient_prompt ]]; then if [[ $_POWERLEVEL9K_TRANSIENT_PROMPT == always || $_p9k__cwd == $_p9k__last_prompt_pwd ]]; then - RPROMPT= - PROMPT=$_p9k_transient_prompt + optimized=1 __p9k_reset_state=2 else _p9k__last_prompt_pwd=$_p9k__cwd @@ -7390,11 +7391,11 @@ function _p9k_on_widget_zle-line-finish() { zle -F $_p9k__restore_prompt_fd _p9k_restore_prompt fi fi - if (( $+termcap[up] )); then - (( _p9k__can_hide_cursor )) && local hide=$terminfo[civis] || local hide= - echo -nE - $hide$'\n'$termcap[up] + if (( optimized )); then + RPROMPT= PROMPT=$_p9k_transient_prompt _p9k_reset_prompt + else + _p9k_reset_prompt fi - _p9k_reset_prompt fi _p9k__line_finished='%{%}' |