1 Author: Per von Zweigbergk <pvz@e.kth.se> vim:ft=diff:
2 Description: fix staircase effect in error message, BTS #83039
5 ===================================================================
8 @@ -267,6 +267,7 @@ ExtFunc volatile void die(char *msg)
10 ExtFunc volatile void fatal(char *msg)
13 fprintf(stderr, "%s\n", msg);
17 ===================================================================
20 @@ -57,6 +57,7 @@ static EventGenRec keyGen =
21 static int boardYPos[MAX_SCREENS], boardXPos[MAX_SCREENS];
22 static int statusYPos, statusXPos;
24 +static int screens_dirty = 0;
26 static char *term_vi; /* String to make cursor invisible */
27 static char *term_ve; /* String to make cursor visible */
28 @@ -98,6 +99,7 @@ ExtFunc void InitScreens(void)
31 AtExit(CleanupScreens);
33 RestoreSignals(NULL, &oldMask);
36 @@ -116,9 +118,12 @@ ExtFunc void InitScreens(void)
38 ExtFunc void CleanupScreens(void)
40 - RemoveEventGen(&keyGen);
42 - OutputTermStr(term_ve, 1);
43 + if (screens_dirty) {
44 + RemoveEventGen(&keyGen);
46 + OutputTermStr(term_ve, 1);
51 ExtFunc void GetTermcapInfo(void)