riched20: Don't call ME_UpdateRepaint inside set_selection().

This partially reverts c5daf6a30f (riched20: Call ME_UpdateRepaint
instead of editor_ensure_visible in set_selection.)

Fixes: c5daf6a30f
This commit is contained in:
Jinoh Kang 2023-07-01 13:36:17 +09:00 committed by Alexandre Julliard
parent c35926e498
commit ac51101314
2 changed files with 2 additions and 5 deletions

View file

@ -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;

View file

@ -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);