aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-03-05 19:46:46 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-03-05 19:46:46 +0300
commite302a9693e5b48771bffdb70ea2cd11ebfb277e2 (patch)
treebcf947df1a18c88cc4cf8539fe56b2bb3c3bc935 /internal
parent33a72faf5f36fc07e0883ff02b879ff888373b6c (diff)
bug fix: restore special handling of `clear` and `reset`; see #545
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index cdc0187e..ad85182e 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5104,7 +5104,6 @@ _p9k_preexec1() {
_p9k_preexec2() {
_p9k__preexec_cmd=$2
_p9k__timer_start=EPOCHREALTIME
- [[ "$2" != (clear|reset) ]] || P9K_TTY=new
}
function _p9k_prompt_net_iface_init() {
@@ -6068,8 +6067,6 @@ function _p9k_on_expand() {
P9K_TTY=new
fi
fi
- elif [[ $P9K_TTY == new && $_p9k__fully_initialized == 1 ]] && ! zle; then
- P9K_TTY=old
fi
__p9k_reset_state=1
@@ -6207,6 +6204,12 @@ _p9k_precmd_impl() {
fi
_p9k_save_status
+ if [[ $_p9k__preexec_cmd == (clear|reset) ]]; then
+ P9K_TTY=new
+ elif [[ $P9K_TTY == new && $_p9k__fully_initialized == 1 ]] && ! zle; then
+ P9K_TTY=old
+ fi
+
_p9k__timer_start=0
_p9k__region_active=0