iomenu

interactive text selection menu
Log | Files | Refs | README | LICENSE

commit cf83d371853dced03fb2db5af7f2b8e04e48f469
parent 787d55ac409e0f0072e9520fc0967beb684aab06
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 30 Oct 2017 01:25:07 +0100

display.c: fixed input offset bug

Diffstat:
Mdisplay.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/display.c b/display.c @@ -65,11 +65,12 @@ print_screen(void) p = 0; i = current - current % rows; m = matchv + i; - fputs("\x1b[H;\x1b[J", stderr); + fputs("\x1b[2J", stderr); while (p < rows && i < matchc) { print_line(*m, i == current); p++, i++, m++; } + fputs("\x1b[H", stderr); if (*prompt) { format(prompt, cols - 2); fprintf(stderr, "\x1b[30;47m %s \x1b[m", formatted);