From c7a1dd3e3bca056d87b484ede76f3d90e7e98718 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Wed, 23 Apr 2003 13:16:48 +0000 Subject: [PATCH] PATCH: [ 721939 ] Wider horiz scroll + more space after last char --- Src/editlib/ccrystaltextview.cpp | 13 ++++++++----- Src/readme.txt | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Src/editlib/ccrystaltextview.cpp b/Src/editlib/ccrystaltextview.cpp index 31fb44281..2d81af082 100644 --- a/Src/editlib/ccrystaltextview.cpp +++ b/Src/editlib/ccrystaltextview.cpp @@ -2815,7 +2815,8 @@ RecalcHorzScrollBar (BOOL bPositionOnly /*= FALSE*/ ) } si.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE; si.nMin = 0; - si.nMax = GetMaxLineLength () - 1; + // Cheat longer line + si.nMax = GetMaxLineLength () * 2 - 1; si.nPage = GetScreenChars (); si.nPos = m_nOffsetChar; } @@ -2833,7 +2834,8 @@ OnHScroll (UINT nSBCode, UINT nPos, CScrollBar * pScrollBar) VERIFY (GetScrollInfo (SB_HORZ, &si)); int nPageChars = GetScreenChars (); - int nMaxLineLength = GetMaxLineLength (); + // Cheat longer line + int nMaxLineLength = GetMaxLineLength () * 2; int nNewOffset; switch (nSBCode) @@ -3341,7 +3343,8 @@ EnsureVisible (CPoint pt) const int nScreenChars = GetScreenChars (); if (nActualPos > nNewOffset + nScreenChars) { - nNewOffset = nActualPos - nScreenChars; + // Add 10 chars width space after line + nNewOffset = nActualPos - nScreenChars + 10; } if (nActualPos < nNewOffset) { @@ -3349,8 +3352,8 @@ EnsureVisible (CPoint pt) } const int nMaxLineLen = GetMaxLineLength (); - if (nNewOffset >= nMaxLineLen) - nNewOffset = nMaxLineLen - 1; + if (nNewOffset >= nMaxLineLen * 2) + nNewOffset = nMaxLineLen * 2 - 1; if (nNewOffset < 0) nNewOffset = 0; diff --git a/Src/readme.txt b/Src/readme.txt index 3541213a1..7ec570a20 100644 --- a/Src/readme.txt +++ b/Src/readme.txt @@ -1,3 +1,7 @@ +2003-04-23 Kimmo + PATCH: [ 721939 ] Wider horiz scroll + more space after last char + editlib: ccrystaltextview.cpp + 2003-04-20 Perry Changed dynamic array to be CArray based editlib: ccrystaltextview.cpp -- 2.11.0