Huw Davies : riched20: Ensure the cursors are equal after deleting the selection.

Alexandre Julliard julliard at winehq.org
Tue Jan 7 13:21:18 CST 2014


Module: wine
Branch: master
Commit: a53179dadd5779cfcdb1ebcdb85a1b93632449ff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a53179dadd5779cfcdb1ebcdb85a1b93632449ff

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Jan  7 12:44:24 2014 +0000

riched20: Ensure the cursors are equal after deleting the selection.

---

 dlls/riched20/caret.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index ef768c4..e510033 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -1485,7 +1485,9 @@ void ME_DeleteSelection(ME_TextEditor *editor)
 {
   int from, to;
   int nStartCursor = ME_GetSelectionOfs(editor, &from, &to);
+  int nEndCursor = nStartCursor ^ 1;
   ME_DeleteTextAtCursor(editor, nStartCursor, to - from);
+  editor->pCursors[nEndCursor] = editor->pCursors[nStartCursor];
 }
 
 ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor)




More information about the wine-cvs mailing list