File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,15 +613,12 @@ _cs_redraw() {
613613 # Calcula quantas linhas o conteúdo anterior pode ter ocupado
614614 local _term_cols; _term_cols=$( tput cols 2> /dev/null || printf ' 80' )
615615 local _total_len=$(( _CS_PS1 _LEN + _CS_PREV_BUF_LEN ))
616- local _prev_lines=$(( (_total_len + _term_cols - 1 ) / _term_cols ))
617- (( _prev_lines < 1 )) && _prev_lines=1
616+ local _prev_lines=$(( _total_len / _term_cols ))
618617 local _i
619618 for (( _i= 0 ; _i < _prev_lines; _i++ )) ; do
620619 printf ' \e[2K\e[1A' >&2
621620 done
622- printf ' \e[2K\r' >&2
623- printf ' %s' " $_CS_PS1_UPPER " >&2
624- printf ' %s%s' " $_CS_PS1_LAST " " $colored " >&2
621+ printf ' \e[2K\r%s%s' " $_CS_PS1_LAST " " $colored " >&2
625622 printf ' \r\e[%dG' " $(( ( _CS_PS1 _LEN + _CS_POS ) % _term_cols + 1 )) " >&2
626623 _CS_PREV_BUF_LEN=${# _CS_BUFFER}
627624 fi
You can’t perform that action at this time.
0 commit comments