Avoid redundant redraws on resize

Use a global flag to record whether the terminal was resized instead of
redrawing everything each time a KEY_RESIZE is read.

Add some additional checks to help_write_pad() as invalid actions may be
passed now due to using signals instead of virtual key presses.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2011-06-28 11:05:05 +02:00
parent 6636232bc7
commit fec37db06b
7 changed files with 105 additions and 76 deletions

View File

@@ -43,6 +43,7 @@
* variables to store window size
*/
int col = 0, row = 0;
int resize = 0;
/* variable to tell if the terminal supports color */
unsigned colorize = 0;