riched20: Set modify state when removing text.

This commit is contained in:
Clinton Stimpson 2007-04-25 16:54:53 -06:00 committed by Alexandre Julliard
parent 2d9685db77
commit 552bc81f1e
2 changed files with 10 additions and 0 deletions

View File

@ -366,6 +366,8 @@ void ME_DeleteTextAtCursor(ME_TextEditor *editor, int nCursor,
int nChars) int nChars)
{ {
assert(nCursor>=0 && nCursor<editor->nCursors); assert(nCursor>=0 && nCursor<editor->nCursors);
/* text operations set modified state */
editor->nModifyStep = 1;
ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars); ME_InternalDeleteText(editor, ME_GetCursorOfs(editor, nCursor), nChars);
} }

View File

@ -1322,6 +1322,14 @@ static void test_EM_GETMODIFY(void)
result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0); result = SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0);
ok (result != 0, ok (result != 0,
"EM_GETMODIFY returned zero, instead of non-zero for WM_CHAR\n"); "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 */ /* set char format */
SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0); SendMessage(hwndRichEdit, EM_SETMODIFY, FALSE, 0);