Introduction
Introduction Statistics Contact Development Disclaimer Help
ui_ti: replace manual padding with clr_eol - sacc - sacc - sacc(omys), simple c…
git clone git://git.codemadness.org/sacc
Log
Files
Refs
LICENSE
---
commit fe6bd5b52afc219737bd22f94ec3d679ac624de3
parent c0a79c0424a99180ed4c79e3335dc3f7ced2322c
Author: Quentin Rameau <[email protected]>
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:
M ui_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);
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.