Commit d48905cf authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

richedit: Small optimisation in ME_GetSelectionInsertStyle.

parent e9be142d
......@@ -1244,11 +1244,11 @@ ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor)
{
ME_Style *style;
int from, to;
ME_Cursor c;
ME_GetSelection(editor, &from, &to);
ME_CursorFromCharOfs(editor, from, &c);
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 */
}
......
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