From 56938e40dab485bca704ac9ad457debe722917b1 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Mon, 12 Mar 2012 17:57:51 +0100 Subject: [Prompts] Discards glitches with BANG_HIST or AUTO_CORRECT ... --- 12_Prompts.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '12_Prompts.zsh') diff --git a/12_Prompts.zsh b/12_Prompts.zsh index ec88067..61ca77a 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -94,11 +94,10 @@ preexec () lines=$(( $lines + $( echo -n "$1" | tr ';\n' '.;' | sed 's/^\(.*[^;]\)\(;*\)$/\2/' | wc -c ) )) tput sc - # /TODO/ GET A WAY TO KNOW IF THERE HAVE BEEN AN HIST_BANG OR NOT... for i in {1..$lines} ; tput cuu1 - print -Pn "$PS1" + # 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 - #print -Pn $C_"30"$_C"-$(echo -n "$1" | wc -l)-> ${(q)1} <-"$lines"-\n" print -Pn "$C_$_prompt_colors[exec]$_C" } -- cgit v1.2.3