riched20: Set modify state when removing text.
This commit is contained in:
parent
2d9685db77
commit
552bc81f1e
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1323,6 +1323,14 @@ static void test_EM_GETMODIFY(void)
|
||||||
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);
|
||||||
cf2.cbSize = sizeof(CHARFORMAT2);
|
cf2.cbSize = sizeof(CHARFORMAT2);
|
||||||
|
|
Loading…
Reference in New Issue