richedit: Don't force repaint while the redraw flag is off.
This commit is contained in:
parent
f43570cbf0
commit
d5478118a1
|
@ -2660,7 +2660,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
ME_SendRequestResize(editor, TRUE);
|
ME_SendRequestResize(editor, TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_SETREDRAW:
|
case WM_SETREDRAW:
|
||||||
editor->bRedraw = wParam;
|
if ((editor->bRedraw = wParam))
|
||||||
|
ME_RewrapRepaint(editor);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor)
|
||||||
{
|
{
|
||||||
/* Should be called whenever the contents of the control have changed */
|
/* Should be called whenever the contents of the control have changed */
|
||||||
ME_Cursor *pCursor;
|
ME_Cursor *pCursor;
|
||||||
|
|
||||||
|
if (!editor->bRedraw) return;
|
||||||
if (ME_WrapMarkedParagraphs(editor))
|
if (ME_WrapMarkedParagraphs(editor))
|
||||||
ME_UpdateScrollBar(editor);
|
ME_UpdateScrollBar(editor);
|
||||||
|
|
||||||
|
@ -135,10 +136,12 @@ ME_RewrapRepaint(ME_TextEditor *editor)
|
||||||
* looks, but not content. Like resizing. */
|
* looks, but not content. Like resizing. */
|
||||||
|
|
||||||
ME_MarkAllForWrapping(editor);
|
ME_MarkAllForWrapping(editor);
|
||||||
ME_WrapMarkedParagraphs(editor);
|
if (editor->bRedraw)
|
||||||
ME_UpdateScrollBar(editor);
|
{
|
||||||
|
ME_WrapMarkedParagraphs(editor);
|
||||||
ME_Repaint(editor);
|
ME_UpdateScrollBar(editor);
|
||||||
|
ME_Repaint(editor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ME_twips2pointsX(ME_Context *c, int x)
|
int ME_twips2pointsX(ME_Context *c, int x)
|
||||||
|
|
Loading…
Reference in New Issue