File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -605,14 +605,14 @@ _cs_redraw() {
605605 fi
606606 # Calcula quantas linhas o conteúdo anterior pode ter ocupado
607607 local _term_cols; _term_cols=$( tput cols 2> /dev/null || printf ' 80' )
608- local _prev_len=$(( _CS_PS1 _LEN + ${# _CS_BUFFER} ))
609- local _prev_lines=$(( _prev_len / _term_cols ))
610- # Sobe e limpa todas as linhas do wrap anterior
608+ local _total_len=$(( _CS_PS1 _LEN + _CS_PREV_BUF_LEN ))
609+ local _prev_lines=$(( _total_len / _term_cols ))
611610 if (( _prev_lines > 0 )) ; then
612611 printf ' \e[%dA' " $_prev_lines " >&2
613612 fi
614- printf ' \r\e[J %s%s' " $_CS_PS1_LAST " " $colored " >&2
613+ printf ' \r\e[2K %s%s\e[K ' " $_CS_PS1_LAST " " $colored " >&2
615614 printf ' \r\e[%dG' " $(( ( _CS_PS1 _LEN + _CS_POS ) % _term_cols + 1 )) " >&2
615+ _CS_PREV_BUF_LEN=${# _CS_BUFFER}
616616 _gt_overlay
617617 fi
618618
You can’t perform that action at this time.
0 commit comments