richedit: Removed redundant code for getting the insert style.

The function ME_GetInsertStyle already checks for the case where there
is a selection, so there is no need to duplicate this code for
ME_GetSelectionInsertStyle.
This commit is contained in:
Dylan Smith 2008-06-26 16:17:17 -04:00 committed by Alexandre Julliard
parent 629761acde
commit 461830a83d
1 changed files with 1 additions and 13 deletions
dlls/riched20

View File

@ -1291,19 +1291,7 @@ void ME_DeleteSelection(ME_TextEditor *editor)
ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor)
{
ME_Style *style;
int from, to;
ME_GetSelection(editor, &from, &to);
if (from != to) {
ME_Cursor c;
ME_CursorFromCharOfs(editor, from, &c);
style = c.pRun->member.run.style;
ME_AddRefStyle(style); /* ME_GetInsertStyle has already done that */
}
else
style = ME_GetInsertStyle(editor, 0);
return style;
return ME_GetInsertStyle(editor, 0);
}
void ME_SendSelChange(ME_TextEditor *editor)