richedit: Small optimisation in ME_GetSelectionInsertStyle.

This commit is contained in:
Eric Pouech 2008-01-01 22:05:16 +01:00 committed by Alexandre Julliard
parent e9be142d78
commit d48905cf21
1 changed files with 3 additions and 3 deletions

View File

@ -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 */
}