From 552bc81f1ec7fc1a15d8c4e6304d1cb0ef42060f Mon Sep 17 00:00:00 2001 From: Clinton Stimpson Date: Wed, 25 Apr 2007 16:54:53 -0600 Subject: [PATCH] riched20: Set modify state when removing text. --- dlls/riched20/caret.c | 2 ++ dlls/riched20/tests/editor.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 3f9547e7c25..5f3259e5dbe 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 && nCursornCursors); + /* 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 4f95bfe703a..caf32f9f9b6 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); -- 2.11.4.GIT