summaryrefslogtreecommitdiff
path: root/12_Prompts.zsh
diff options
context:
space:
mode:
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r--12_Prompts.zsh11
1 files changed, 8 insertions, 3 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 4e70f66..20a4f94 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -91,6 +91,13 @@ __get_prompt_lines()
echo $lines
}
+# Rewrites current prompt.
+__up_up ()
+{
+ for i in {1..$(__get_prompt_lines)}
+ tput cuu1
+}
+
preexec ()
{
__term_title "$2"
@@ -101,10 +108,8 @@ preexec ()
__hbar
__redefine_prompt
- local lines=$(__get_prompt_lines "$1")
-
tput sc
- for i in {1..$lines} ; tput cuu1
+ __up_up
# Only redraws the date, not the full prompt, since we got glitches with BANG_HIST and AUTOCORRECT...
print -Pn $(tput cub $COLUMNS ; tput cuf $(($COLUMNS - $DATESIZE)))$C_$_prompt_colors[bar]$_C$DATE
tput rc