Module: wine Branch: master Commit: d48905cf21853f6d117e669cf69061a1d3ff4173 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d48905cf21853f6d117e669cf6...
Author: Eric Pouech eric.pouech@orange.fr Date: Tue Jan 1 22:05:16 2008 +0100
richedit: Small optimisation in ME_GetSelectionInsertStyle.
---
dlls/riched20/caret.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 2ca076d..2337107 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -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 */ }