aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-03-05 19:16:14 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-03-05 19:16:14 +0300
commitd4854bfb30403a70862005487f27ae8b9da2f09e (patch)
tree768564b5652ca1a8283eb2d4765bc2fa4dbb25ac /internal/p10k.zsh
parent0205c01ba952b9dee87b4f7b734e61c47607b7a4 (diff)
don't print an empty line after `clear`, `reset` and `clear-screen`; see #545
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c8c80295..92640021 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5104,6 +5104,7 @@ _p9k_preexec1() {
_p9k_preexec2() {
_p9k__preexec_cmd=$2
_p9k__timer_start=EPOCHREALTIME
+ [[ "$2" != (clear|reset) ]] || P9K_TTY=new
}
function _p9k_prompt_net_iface_init() {
@@ -6988,6 +6989,11 @@ function _p9k_widget_hook() {
eval "$__p9k_intro"
(( _p9k__restore_prompt_fd )) && _p9k_restore_prompt $_p9k__restore_prompt_fd
+ if [[ $1 == clear-screen ]]; then
+ P9K_TTY=new
+ _p9k__expanded=0
+ _p9k_reset_prompt
+ fi
__p9k_reset_state=1
_p9k_check_visual_mode
local pat idx var
@@ -7028,6 +7034,7 @@ function _p9k_wrap_widgets() {
visual-mode
visual-line-mode
deactivate-region
+ clear-screen
$_POWERLEVEL9K_HOOK_WIDGETS
)
else