riched20: Update the auto url detection after a StreamIn.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a65c31e46f
commit
adb43b9192
@ -1559,8 +1559,9 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
|
|||||||
|
|
||||||
if (!invalidRTF && !inStream.editstream->dwError)
|
if (!invalidRTF && !inStream.editstream->dwError)
|
||||||
{
|
{
|
||||||
if (format & SF_RTF) {
|
ME_Cursor start;
|
||||||
from = ME_GetCursorOfs(&editor->pCursors[0]);
|
from = ME_GetCursorOfs(&editor->pCursors[0]);
|
||||||
|
if (format & SF_RTF) {
|
||||||
|
|
||||||
/* setup the RTF parser */
|
/* setup the RTF parser */
|
||||||
memset(&parser, 0, sizeof parser);
|
memset(&parser, 0, sizeof parser);
|
||||||
@ -1662,12 +1663,17 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
|
|||||||
style = parser.style;
|
style = parser.style;
|
||||||
}
|
}
|
||||||
else if (format & SF_TEXT)
|
else if (format & SF_TEXT)
|
||||||
|
{
|
||||||
num_read = ME_StreamInText(editor, format, &inStream, style);
|
num_read = ME_StreamInText(editor, format, &inStream, style);
|
||||||
|
to = ME_GetCursorOfs(&editor->pCursors[0]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ERR("EM_STREAMIN without SF_TEXT or SF_RTF\n");
|
ERR("EM_STREAMIN without SF_TEXT or SF_RTF\n");
|
||||||
/* put the cursor at the top */
|
/* put the cursor at the top */
|
||||||
if (!(format & SFF_SELECTION))
|
if (!(format & SFF_SELECTION))
|
||||||
ME_SetSelection(editor, 0, 0);
|
ME_SetSelection(editor, 0, 0);
|
||||||
|
ME_CursorFromCharOfs(editor, from, &start);
|
||||||
|
ME_UpdateLinkAttribute(editor, &start, to - from);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restore saved undo mode */
|
/* Restore saved undo mode */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user