Skip to content

Instantly share code, notes, and snippets.

@saitoha
Created June 30, 2013 09:33
Show Gist options
  • Select an option

  • Save saitoha/5894511 to your computer and use it in GitHub Desktop.

Select an option

Save saitoha/5894511 to your computer and use it in GitHub Desktop.
Fix DECALN behavior
diff --git a/VT100Screen.m b/VT100Screen.m
index a0d4db5..1e03101 100644
--- a/VT100Screen.m
+++ b/VT100Screen.m
@@ -1997,6 +1997,12 @@ static BOOL XYIsBeforeXY(int px1, int py1, int px2, int py2) {
}
aLine[WIDTH].code = EOL_HARD;
}
+ // reset scroll region
+ SCROLL_TOP = 0;
+ SCROLL_BOTTOM = HEIGHT - 1;
+ // set cursor to (1, 1)
+ [self setCursorX:0 Y:0];
+
DebugLog(@"putToken DECALN");
[self setDirty];
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment