fix #343 noncurses ouptut method vertical offset

a new line after last row caused the terminal to start scrolling
this was resolved in the past by simply not drawing that row.

new fix is to not newline at the last row, but do a return instead
master
karlstav 6 years ago
parent 626ba55018
commit 194c199c3f
  1. 7
      output/terminal_noncurses.c

@ -120,7 +120,7 @@ int draw_terminal_noncurses(int tty, int h, int w, int bars, int bw, int bs, int
}
}
for (n = h - 2; n >= 0; n--) {
for (n = h - 1; n >= 0; n--) {
move = rest; // center adjustment
for (o = 0; o < bars; o++) {
@ -161,7 +161,10 @@ int draw_terminal_noncurses(int tty, int h, int w, int bars, int bw, int bs, int
move += bs; // move to next bar
}
printf("\n");
if (n != 0)
printf("\n");
else
printf("\r");
}
printf("\033[%dA", h);

Loading…
Cancel
Save