fix last-char-of-preprompt-on-last-column condition

See https://github.com/sindresorhus/pure/pull/142#issuecomment-120961475.
This commit is contained in:
Zhiming Wang
2015-07-14 17:52:33 -07:00
parent 57bfd997a5
commit 4a35b8002b

View File

@@ -111,7 +111,7 @@ prompt_pure_preprompt_render() {
# disable clearing of line if last char of preprompt is last column of terminal # disable clearing of line if last char of preprompt is last column of terminal
local clr="\e[K" local clr="\e[K"
(( $preprompt_length * $lines == $COLUMNS - 1 )) && clr="" (( $COLUMNS * $lines == $preprompt_length )) && clr=""
# modify previous preprompt # modify previous preprompt
print -Pn "\e7\e[${lines}A\e[1G${preprompt}${clr}\e8" print -Pn "\e7\e[${lines}A\e[1G${preprompt}${clr}\e8"