From 4a35b8002be0d27fa4dababffb9100f112c62d1a Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Tue, 14 Jul 2015 17:52:33 -0700 Subject: [PATCH] fix last-char-of-preprompt-on-last-column condition See https://github.com/sindresorhus/pure/pull/142#issuecomment-120961475. --- pure.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure.zsh b/pure.zsh index 24c0328..db3ab21 100644 --- a/pure.zsh +++ b/pure.zsh @@ -111,7 +111,7 @@ prompt_pure_preprompt_render() { # disable clearing of line if last char of preprompt is last column of terminal local clr="\e[K" - (( $preprompt_length * $lines == $COLUMNS - 1 )) && clr="" + (( $COLUMNS * $lines == $preprompt_length )) && clr="" # modify previous preprompt print -Pn "\e7\e[${lines}A\e[1G${preprompt}${clr}\e8"