Skip to content
Snippets Groups Projects
Commit d5c23f1f authored by George Nachman's avatar George Nachman
Browse files

Fix state restoration when the number of scrollback lines is less than session height.

parent 9b561775
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4826,7 +4826,7 @@ static void SwapInt(int *a, int *b) {
if (includeRestorationBanner && [iTermAdvancedSettingsModel showSessionRestoredBanner]) {
[lineBuffer appendMessage:@"Session Contents Restored"];
}
[lineBuffer setMaxLines:maxScrollbackLines_];
[lineBuffer setMaxLines:maxScrollbackLines_ + self.height];
if (!unlimitedScrollback_) {
[lineBuffer dropExcessLinesWithWidth:self.width];
}
Loading
Loading
@@ -4848,6 +4848,12 @@ static void SwapInt(int *a, int *b) {
currentGrid_.cursorY = linesRestored + 1;
currentGrid_.cursorX = 0;
 
// Reduce line buffer's max size to not include the grid height. This is its final state.
[lineBuffer setMaxLines:maxScrollbackLines_];
if (!unlimitedScrollback_) {
[lineBuffer dropExcessLinesWithWidth:self.width];
}
if (screenState) {
[tabStops_ removeAllObjects];
[tabStops_ addObjectsFromArray:screenState[kScreenStateTabStopsKey]];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment