OSDN Git Service

BUG: [ 1706476 ] (2.6.6.0) wrap lines looses horizontal scroll bar
authorGal Hammer <galh@users.sourceforge.net>
Thu, 26 Apr 2007 05:46:40 +0000 (05:46 +0000)
committerGal Hammer <galh@users.sourceforge.net>
Thu, 26 Apr 2007 05:46:40 +0000 (05:46 +0000)
Src/Changes.txt
Src/editlib/ccrystaltextview.cpp

index d534764..570c0e7 100644 (file)
@@ -2,6 +2,10 @@ Src\Changes.txt
 Add new items to top.
 (This summarizes all changes to all files under Src, including Src\Languages.)
 
+2007-04-26 Gal
+ BUG: [ 1706476 ] (2.6.6.0) wrap lines looses horizontal scroll bar
+  Src/editlib: ccrystaltextview.cpp
+
 2007-04-16 Tim
  PATCH: [ 1701151 ] Various Updates in German Translation
   Src/Languages/German: MergeGerman.rc
index b5f685b..81ade09 100644 (file)
@@ -3253,15 +3253,22 @@ RecalcHorzScrollBar (BOOL bPositionOnly /*= FALSE*/ )
   SCROLLINFO si = {0};
   si.cbSize = sizeof (si);
 
+  const int nScreenChars = GetScreenChars();
+  
   if (m_bWordWrap)
     {
+       if (m_nOffsetChar > nScreenChars)
+         {
+           m_nOffsetChar = 0;
+           UpdateCaret ();
+         }
+
       // Disable horizontal scroll bar
       si.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_POS | SIF_RANGE;
       SetScrollInfo (SB_HORZ, &si);
       return;
     }
 
-  const int nScreenChars = GetScreenChars();
   const int nMaxLineLen = GetMaxLineLength ();
 
   if (bPositionOnly)