Commit 87292d81 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Avoid unconditionally rewrapping text on scroll.

parent da058cbf
......@@ -1046,6 +1046,9 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
{
SCROLLINFO si;
int nOrigPos, nNewPos, nActualScroll;
HWND hWnd;
LONG winStyle;
BOOL bScrollBarIsVisible, bScrollBarWillBeVisible;
nOrigPos = ME_GetYScrollPos(editor);
......@@ -1083,7 +1086,15 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type)
ME_Repaint(editor);
}
editor->vert_si.nMax = 0;
hWnd = editor->hWnd;
winStyle = GetWindowLongW(hWnd, GWL_STYLE);
bScrollBarIsVisible = (winStyle & WS_VSCROLL) != 0;
bScrollBarWillBeVisible = (editor->nHeight > editor->sizeWindow.cy)
|| (winStyle & ES_DISABLENOSCROLL);
if (bScrollBarIsVisible != bScrollBarWillBeVisible)
{
ShowScrollBar(hWnd, SB_VERT, bScrollBarWillBeVisible);
}
ME_UpdateScrollBar(editor);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment