Use window size when buffer size > 100 lines

This commit is contained in:
Alexander S. Aganichev 2002-07-08 14:07:59 +00:00
parent 5bbcdba9f2
commit 105c2e765d
2 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
! Win32 console: if buffer size is set to more than 100 lines then
windows size will be used.
- Fixed infinite loop when last message is twitkill, previous deleted
and showdeleted is off (untested).

View File

@ -595,6 +595,13 @@ void GVid::detectinfo(GVidInfo* _info) {
_info->cursor.column = csbi.dwCursorPosition.X;
_info->color.textattr = csbi.wAttributes;
if(_info->screen.rows > 100) {
_info->screen.rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
_info->screen.columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
_info->cursor.row = csbi.dwCursorPosition.Y - csbi.srWindow.Top + 1;
_info->cursor.column = csbi.dwCursorPosition.X - csbi.srWindow.Left + 1;
}
// Get cursor form
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(gvid_hout, &cci);