Clinton Stimpson : riched20: Set modify state when removing text.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 26 10:23:54 CDT 2007
Module: wine
Branch: master
Commit: 552bc81f1ec7fc1a15d8c4e6304d1cb0ef42060f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=552bc81f1ec7fc1a15d8c4e6304d1cb0ef42060f
Author: Clinton Stimpson <cjstimpson at utwire.net>
Date: Wed Apr 25 16:54:53 2007 -0600
riched20: Set modify state when removing text.
---
dlls/riched20/caret.c | 2 ++
dlls/riched20/tests/editor.c | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 3f9547e..5f3259e 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -366,6 +366,8 @@ void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor,
int nChars)
{
assert(nCursor>=0 && nCursor<editor->nCursors);
+ /* text operations set modified state */
+ editor->nModifyStep = 1;
ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars);
}
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 4f95bfe..caf32f9 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -1322,6 +1322,14 @@ static void test_EM_GETMODIFY(void)
result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0);
ok (result != 0,
"EM_GETMODIFY returned zero, instead of non-zero for WM_CHAR\n");
+
+ /* press del */
+ SendMessage(hwndRichEdit, WM_CHAR, 'A', 0);
+ SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0);
+ SendMessage(hwndRichEdit, WM_KEYDOWN, VK_BACK, 0);
+ result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0);
+ ok (result != 0,
+ "EM_GETMODIFY returned zero, instead of non-zero for backspace\n");
/* set char format */
SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0);
More information about the wine-cvs
mailing list