Record whether the width or height were set manually, and refrain from changing a manually set value when the terminal size changes.

This commit is contained in:
Andrew Wood
2023-08-28 22:03:14 +01:00
parent 9e5bdeb3a4
commit b7eb3c9e90
11 changed files with 56 additions and 18 deletions
+2
View File
@@ -53,6 +53,8 @@ struct opts_s { /* structure describing run-time options */
unsigned int average_rate_window; /* time window in seconds for average rate calculations */
unsigned int width; /* screen width */
unsigned int height; /* screen height */
bool width_set_manually; /* width was set manually, not detected */
bool height_set_manually; /* height was set manually, not detected */
/*@keep@*/ /*@null@*/ char *name; /* display name, if any */
/*@keep@*/ /*@null@*/ char *format; /* output format, if any */
/*@keep@*/ /*@null@*/ char *pidfile; /* PID file, if any */