1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 13:30:07 +00:00

simplify code a little bit

This commit is contained in:
romkatv 2020-02-26 12:00:13 +01:00
parent e7b036418b
commit 3077929e18

View file

@ -6902,25 +6902,23 @@ function _p9k_wrap_widgets() {
function _p9k_restore_prompt() { function _p9k_restore_prompt() {
eval "$__p9k_intro" eval "$__p9k_intro"
{ zle -F $1
(( _p9k__must_restore_prompt )) || return exec {1}>&-
_p9k__must_restore_prompt=0 _p9k__restore_prompt_fd=0
unset _p9k__line_finished (( _p9k__must_restore_prompt )) || return 0
_p9k__refresh_reason=restore _p9k__must_restore_prompt=0
_p9k_set_prompt
_p9k__refresh_reason=
local tty=$P9K_TTY unset _p9k__line_finished
P9K_TTY=$_p9k__last_tty _p9k__refresh_reason=restore
_p9k__expanded=0 _p9k_set_prompt
_p9k_reset_prompt _p9k__refresh_reason=
P9K_TTY=$tty
} always { local tty=$P9K_TTY
zle -F $1 P9K_TTY=$_p9k__last_tty
exec {1}>&- _p9k__expanded=0
_p9k__restore_prompt_fd=0 _p9k_reset_prompt
} P9K_TTY=$tty
} }
prompt__p9k_internal_nothing() { _p9k__prompt+='${_p9k__sss::=}'; } prompt__p9k_internal_nothing() { _p9k__prompt+='${_p9k__sss::=}'; }