Browse Source

explicitly detect altscreen

Jan Klemkow 5 years ago
parent
commit
76f44ef345
1 changed files with 5 additions and 3 deletions
  1. 5 3
      scroll.c

+ 5 - 3
scroll.c

@@ -215,11 +215,13 @@ isaltscreen(char c)
 
 			if (strcmp(buf, "?1049h") == 0 ||
 			    strcmp(buf, "?1047h") == 0 ||
-			    strcmp(buf, "?47h"  ) == 0 ||
-			    strcmp(buf, "?1049l") == 0 ||
+			    strcmp(buf, "?47h"  ) == 0)
+				alt = true;
+
+			if (strcmp(buf, "?1049l") == 0 ||
 			    strcmp(buf, "?1047l") == 0 ||
 			    strcmp(buf, "?47l"  ) == 0)
-				alt = !alt;
+				alt = false;
 		}
 		break;
 	}