diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e55f1d21..6304bc1c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -7840,7 +7840,7 @@ _p9k_init_prompt() { fi if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then - if (( _z4h_can_save_restore_screen == 1 )); then + if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then _p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}' _p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' else @@ -7946,7 +7946,8 @@ _p9k_must_init() { _p9k__param_pat+=$'${(M)VTE_VERSION:#(<1-4602>|4801)}\1$DEFAULT_USER\1$P9K_SSH\1$+commands[uname]\1' _p9k__param_pat+=$'$__p9k_root_dir\1$functions[p10k-on-init]\1$functions[p10k-on-pre-prompt]\1' _p9k__param_pat+=$'$functions[p10k-on-post-widget]\1$functions[p10k-on-post-prompt]\1' - _p9k__param_pat+=$'$+commands[git]\1$terminfo[colors]' + _p9k__param_pat+=$'$+commands[git]\1$terminfo[colors]\1${+_z4h_iterm_cmd}\1' + _p9k__param_pat+=$'$_z4h_can_save_restore_screen' local MATCH IFS=$'\1' _p9k__param_pat+="${(@)${(@o)parameters[(I)POWERLEVEL9K_*]}:/(#m)*/\${${(q)MATCH}-$IFS\}}" IFS=$'\2' _p9k__param_sig="${(e)_p9k__param_pat}" @@ -8010,7 +8011,7 @@ function _p9k_init_cacheable() { _p9k_transient_prompt+='${:-"'$_p9k__ret'"}' _p9k_transient_prompt+=')%b%k%f%s%u ' if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then - if (( _z4h_can_save_restore_screen == 1 )); then + if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then _p9k_transient_prompt=$'%{\ePtmux;\e\e]133;A\a\e\\%}'$_p9k_transient_prompt$'%{\ePtmux;\e\e]133;B\a\e\\%}' else _p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}'