summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2024-02-04 21:43:56 +0100
committerpgen <p.gen.progs@gmail.com>2024-02-04 21:43:56 +0100
commit482b39a82661f9cf5d1ff2e9d6457d156b177f2f (patch)
tree67e010be69e2e2fea59206bd9ae431bdec21b4ef
parent310fbbc038d80d59a19d7e1d95602f4366928bcb (diff)
Fix hor. s. bar when term has no column addressing
-rwxr-xr-xsmenu.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/smenu.c b/smenu.c
index 2b50fd1..4a08024 100755
--- a/smenu.c
+++ b/smenu.c
@@ -3787,12 +3787,11 @@ disp_hbar(win_t *win, term_t *term, langinfo_t *langinfo, int pos1, int pos2)
fputs_safe("\r", stdout);
(void)tputs(TPARM2(parm_right_cursor, pos1 + 1), 1, outch);
- for (i = pos1 + 2; i <= pos2 + 1; i++)
+ for (i = pos1; i <= pos2; i++)
fputs_safe(s, stdout);
- (void)tputs(TPARM2(parm_right_cursor, term->ncolumns - 3 - pos2 - 2),
- 1,
- outch);
+ fputs_safe("\r", stdout);
+ (void)tputs(TPARM2(parm_right_cursor, term->ncolumns - 2), 1, outch);
}
else
{