richedit: Small optimisation in ME_GetSelectionInsertStyle.
This commit is contained in:
parent
e9be142d78
commit
d48905cf21
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue