From: Santino Mazza smazza@codeweavers.com
To prevent cases where ME_WrapMarkedParagraphs has not been called causing a NULL pointer when editor_ensure_visible tries to get the row from the cursor.
We call ME_UpdateRepaint because some programs using Microsoft Forms crash when using the set_selection function if we only call ME_WrapMarkedParagraphs. --- dlls/riched20/editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 412648d9116..0c6ae4e8651 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2150,7 +2150,7 @@ int set_selection( ME_TextEditor *editor, int to, int from )
if (!editor->bHideSelection) ME_InvalidateSelection( editor ); end = set_selection_cursors( editor, to, from ); - editor_ensure_visible( editor, &editor->pCursors[0] ); + ME_UpdateRepaint(editor, FALSE); if (!editor->bHideSelection) ME_InvalidateSelection( editor ); update_caret( editor ); ME_SendSelChange( editor );