From a015d10c67c9cbc6448d25156b1b7841c0337153 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 7 Jun 2012 10:35:01 +0200 Subject: [Keys/Prompt] up up and awayyy --- 12_Prompts.zsh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '12_Prompts.zsh') 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 -- cgit v1.2.3