richedit: Avoid unconditionally rewrapping text on scroll.

Dylan Smith dylan.ah.smith at
Thu Sep 18 00:17:45 CDT 2008

At the end of ME_Scroll was the line
  editor->vert_si.nMax = 0
The reason for the assignment was that the scrollbar should be made
visible again on EM_Scroll if it was forced to be invisible by an
application.  A valid case to handle, and tests were added to show this

The problem is that this statement is executed unconditionally, and
always results in ME_UpdateScrollBar evaulating bScrollBarWasVisible to
be FALSE, so if the scrollbar were visible, then it will always show the
scrollbar and rewrap all the paragraphs.  It rewraps all the paragraphs
because it believes that the available width for the text has been
reduced with the scrollbar being added.

This change should improve the speed of scrolling a lot of text, because
rewrapping all the paragraphs would take a long time in this case.
 dlls/riched20/paint.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Avoid-unconditionally-rewrapping-text-o.diff.txt

More information about the wine-patches mailing list