From 105c2e765d2717f9e3ec4e4da429197835ee94a3 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Mon, 8 Jul 2002 14:07:59 +0000 Subject: [PATCH] Use window size when buffer size > 100 lines --- docs/notework.txt | 3 +++ goldlib/gall/gvidinit.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/docs/notework.txt b/docs/notework.txt index b6f5510..6f32ae8 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -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). diff --git a/goldlib/gall/gvidinit.cpp b/goldlib/gall/gvidinit.cpp index 4b134c6..9444141 100644 --- a/goldlib/gall/gvidinit.cpp +++ b/goldlib/gall/gvidinit.cpp @@ -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);