Commit 461830a8 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

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.
parent 629761ac
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment