Skip to content

Commit

Permalink
Merge pull request #135 from hartwork/fix-legend-for-two-mode-when-wa…
Browse files Browse the repository at this point in the history
…iting-for-input

Fix legend for `-2` mode when waiting for input (improvement over #98)
  • Loading branch information
hartwork authored Nov 30, 2023
2 parents 6869c8b + 9cb63f4 commit 2238c11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recordings/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
| │ |
| └─────────────────────────────────────────────────────────────────────────────────────> |
| X Thu Jan 1 00:00:00 1970 |
| https://github.com/tenox7/ttyplot 1.6.0 |
|   https://github.com/tenox7/ttyplot 1.6.0 |
+------------------------------------------------------------------------------------------+

[90x20] Frame 2:
Expand Down
6 changes: 4 additions & 2 deletions ttyplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,10 @@ void paint_plot(void) {
if(rate)
printw(" interval=%.3gs", td);

if(two) {
mvaddch(height-1, 5, ' '|A_REVERSE);
}
if (two) {
mvaddch(height-1, 5, ' '|A_REVERSE);
if (v > 0) {
mvprintw(height-1, 7, "last=%.1f min=%.1f max=%.1f avg=%.1f %s ", values2[n], min2, max2, avg2, unit);
}
}
Expand Down

0 comments on commit 2238c11

Please sign in to comment.