This commit is contained in:
Dylan Araps committed 2020-08-04 16:49:04 +03:00
1 parent 6c29343c32
commit b37de75b0c
1 file changed
+5 -5
+5 -5
View File
@@ -12,7 +12,7 @@ esc() {
ED[0-2]) printf '%s[%sJ' "$esc_char" "${1#ED}" ;; ED[0-2]) printf '%s[%sJ' "$esc_char" "${1#ED}" ;;
EL[0-2]) printf '%s[%sK' "$esc_char" "${1#EL}" ;; EL[0-2]) printf '%s[%sK' "$esc_char" "${1#EL}" ;;
SGR) printf '%s[%s;%sm' "$esc_char" "$2" "$3" ;; SGR) printf '%s[%s;%sm' "$esc_char" "$2" "$3" ;;
cursorhome) printf '%s[%s;%sH' "$esc_char" "$2" "$3" ;; CUP) printf '%s[%s;%sH' "$esc_char" "$2" "$3" ;;
# private # private
IL) printf '%s[%sL' "$esc_char" "$2" ;; # VT102(?) IL) printf '%s[%sL' "$esc_char" "$2" ;; # VT102(?)
@@ -97,7 +97,7 @@ hist_search() {
list_print() { list_print() {
esc ED2 esc ED2
esc cursorhome esc CUP
i=1 i=1
end=$((bottom + 1)) end=$((bottom + 1))
@@ -133,7 +133,7 @@ list_print() {
i=$((i + 1)) i=$((i + 1))
done done
esc cursorhome "$((y > bottom ? y2 : y))" esc CUP "$((y > bottom ? y2 : y))"
} }
redraw() { redraw() {
@@ -143,7 +143,7 @@ redraw() {
status_line() { status_line() {
esc DECSC esc DECSC
esc cursorhome "$LINES" esc CUP "$LINES"
esc SGR 31 7 esc SGR 31 7
printf '%-*s' "$COLUMNS" "$1" printf '%-*s' "$COLUMNS" "$1"
esc SGR esc SGR
@@ -152,7 +152,7 @@ status_line() {
prompt() { prompt() {
esc DECSC esc DECSC
esc cursorhome "$LINES" esc CUP "$LINES"
printf %s "$1" printf %s "$1"
esc DECTCEM h esc DECTCEM h
esc EL0 esc EL0