diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 5cf43f4e29a..201c4435453 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2148,9 +2148,10 @@ int set_selection( ME_TextEditor *editor, int to, int from ) if (!editor->bHideSelection) ME_InvalidateSelection( editor ); end = set_selection_cursors( editor, to, from ); - ME_UpdateRepaint( editor, FALSE ); + editor_ensure_visible( editor, &editor->pCursors[0] ); if (!editor->bHideSelection) ME_InvalidateSelection( editor ); update_caret( editor ); + ME_Repaint( editor ); ME_SendSelChange( editor ); return end; diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c index ec2997cb2df..adb36642f4f 100644 --- a/dlls/riched20/tests/txtsrv.c +++ b/dlls/riched20/tests/txtsrv.c @@ -1303,7 +1303,6 @@ static void test_set_selection_message( void ) ok( hr == S_OK, "got %08lx\n", hr ); CHECK_CALLED(ITextHostImpl_TxViewChange); - todo_wine ok(en_change_sent == 0, "got %d\n", en_change_sent); todo_wine ok(en_selchange_sent == 0, "got %d\n", en_selchange_sent); @@ -1322,7 +1321,6 @@ static void test_set_selection_message( void ) ok( hr == S_OK, "got %08lx\n", hr ); CHECK_CALLED(ITextHostImpl_TxViewChange); - todo_wine ok(en_change_sent == 0, "got %d\n", en_change_sent); ok(en_selchange_sent == 0, "got %d\n", en_selchange_sent); @@ -1353,7 +1351,6 @@ static void test_set_selection_message( void ) ok( hr == S_OK, "got %08lx\n", hr ); CHECK_CALLED(ITextHostImpl_TxViewChange); - todo_wine ok(en_change_sent == 0, "got %d\n", en_change_sent); ok(en_selchange_sent == 1, "got %d\n", en_selchange_sent); @@ -1371,7 +1368,6 @@ static void test_set_selection_message( void ) ok( hr == S_OK, "got %08lx\n", hr ); CHECK_CALLED(ITextHostImpl_TxViewChange); - todo_wine ok(en_change_sent == 0, "got %d\n", en_change_sent); ok(en_selchange_sent == 0, "got %d\n", en_selchange_sent);