Commit 1b7a918b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

riched20: Support SFF_SELECTION when streaming in plain text.

parent 82fa1048
......@@ -1609,9 +1609,17 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
{
style = editor->pBuffer->pDefaultStyle;
ME_AddRefStyle(style);
set_selection_cursors(editor, 0, 0);
ME_InternalDeleteText(editor, &editor->pCursors[1],
ME_GetTextLength(editor), FALSE);
if (format & SFF_SELECTION)
{
ME_GetSelection(editor, &selStart, &selEnd);
ME_InternalDeleteText(editor, selStart, to - from, FALSE);
}
else
{
set_selection_cursors(editor, 0, 0);
ME_InternalDeleteText(editor, &editor->pCursors[1],
ME_GetTextLength(editor), FALSE);
}
from = to = 0;
ME_ClearTempStyle(editor);
editor_set_default_para_fmt( editor, &editor->pCursors[0].para->fmt );
......
......@@ -1482,7 +1482,6 @@ static void test_EM_SETTEXTMODE(void)
SendMessageA(hwndRichEdit, WM_PASTE, 0, 0);
len = SendMessageA(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0);
todo_wine
ok(len == 8 /*winewine*/, "Unexpected text length %u\n", len);
/*Select a character from the first "wine" string*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment