From: Gal Hammer Date: Thu, 26 Apr 2007 05:46:40 +0000 (+0000) Subject: BUG: [ 1706476 ] (2.6.6.0) wrap lines looses horizontal scroll bar X-Git-Tag: 2.16.5~4249 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f33a6c1f92c55f5f8ab8da9b6abf43c246b3c383;p=winmerge-jp%2Fwinmerge-jp.git BUG: [ 1706476 ] (2.6.6.0) wrap lines looses horizontal scroll bar --- diff --git a/Src/Changes.txt b/Src/Changes.txt index d53476402..570c0e760 100644 --- a/Src/Changes.txt +++ b/Src/Changes.txt @@ -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 diff --git a/Src/editlib/ccrystaltextview.cpp b/Src/editlib/ccrystaltextview.cpp index b5f685b81..81ade0956 100644 --- a/Src/editlib/ccrystaltextview.cpp +++ b/Src/editlib/ccrystaltextview.cpp @@ -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)