* The old screen buffer wasn't freed in _ResizeSimple().
* Updated some debug output. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26005 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7f6f9ddb94
commit
13315c5755
@ -941,6 +941,9 @@ BasicTerminalBuffer::_ResizeSimple(int32 width, int32 height,
|
||||
for (int32 i = endLine - firstLine; i < height; i++)
|
||||
lines[i]->Clear();
|
||||
|
||||
_FreeLines(fScreen, fHeight);
|
||||
fScreen = lines;
|
||||
|
||||
fWidth = width;
|
||||
fHeight = height;
|
||||
|
||||
@ -953,8 +956,6 @@ BasicTerminalBuffer::_ResizeSimple(int32 width, int32 height,
|
||||
fCursor.x = width;
|
||||
fCursor.y -= firstLine;
|
||||
|
||||
fScreen = lines;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -1123,24 +1124,23 @@ BasicTerminalBuffer::_ResizeRewrap(int32 width, int32 height,
|
||||
_FreeLines(fScreen, fHeight);
|
||||
delete fHistory;
|
||||
|
||||
fScreen = screen;
|
||||
fHistory = history;
|
||||
|
||||
//debug_printf(" cursor: (%ld, %ld) -> (%ld, %ld)\n", fCursor.x, fCursor.y,
|
||||
//cursor.x, cursor.y);
|
||||
fCursor.x = cursor.x;
|
||||
fCursor.y = cursor.y;
|
||||
//debug_printf(" screen offset: %ld -> %ld\n", fScreenOffset,
|
||||
//destScreenOffset % fHistoryCapacity);
|
||||
//debug_printf(" screen offset: %ld -> %ld\n", fScreenOffset, destScreenOffset % height);
|
||||
fScreenOffset = destScreenOffset % height;
|
||||
//debug_printf(" history size: %ld -> %ld\n", fHistorySize, destTotalLines - fHeight);
|
||||
//debug_printf(" height %ld -> %ld\n", fHeight, tempHeight);
|
||||
//debug_printf(" height %ld -> %ld\n", fHeight, height);
|
||||
//debug_printf(" width %ld -> %ld\n", fWidth, width);
|
||||
fHeight = height;
|
||||
fWidth = width;
|
||||
|
||||
fScrollTop = 0;
|
||||
fScrollBottom = fHeight - 1;
|
||||
|
||||
fScreen = screen;
|
||||
fHistory = history;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user