sacc

sacc(omys), simple console gopher client (mirror)
git clone https://git.parazyd.org/sacc
Log | Files | Refs | LICENSE

commit fe6bd5b52afc219737bd22f94ec3d679ac624de3
parent c0a79c0424a99180ed4c79e3335dc3f7ced2322c
Author: Quentin Rameau <quinq@fifth.space>
Date:   Sat, 26 Sep 2020 17:14:45 +0200

ui_ti: replace manual padding with clr_eol

Thanks to Marcin and Hiltjo for the hint!

Diffstat:
Mui_ti.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/ui_ti.c b/ui_ti.c @@ -66,8 +66,7 @@ uiprompt(char *fmt, ...) n = mbsprint(bufout, columns); putp(tparm(exit_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - if (n < columns) - printf("%*s", columns - n, " "); + putp(tparm(clr_eol, 0, 0, 0, 0, 0, 0, 0, 0, 0)); putp(tparm(cursor_address, lines-1, n, 0, 0, 0, 0, 0, 0, 0)); @@ -157,8 +156,7 @@ uistatus(char *fmt, ...) n = mbsprint(bufout, columns); putp(tparm(exit_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - if (n < columns) - printf("%*s", columns - n, " "); + putp(tparm(clr_eol, 0, 0, 0, 0, 0, 0, 0, 0, 0)); putp(tparm(restore_cursor, 0, 0, 0, 0, 0, 0, 0, 0, 0)); fflush(stdout); @@ -188,8 +186,7 @@ displaystatus(Item *item) bufout[sizeof(bufout)-1] = '\0'; n = mbsprint(bufout, columns); putp(tparm(exit_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - if (n < columns) - printf("%*s", columns - n, " "); + putp(tparm(clr_eol, 0, 0, 0, 0, 0, 0, 0, 0, 0)); putp(tparm(restore_cursor, 0, 0, 0, 0, 0, 0, 0, 0, 0)); fflush(stdout); @@ -243,8 +240,7 @@ displayuri(Item *item) n = mbsprint(bufout, columns); putp(tparm(exit_standout_mode, 0, 0, 0, 0, 0, 0, 0, 0, 0)); - if (n < columns) - printf("%*s", columns - n, " "); + putp(tparm(clr_eol, 0, 0, 0, 0, 0, 0, 0, 0, 0)); putp(tparm(restore_cursor, 0, 0, 0, 0, 0, 0, 0, 0, 0)); fflush(stdout);