riched20: Update the auto url detection after a StreamIn.
Huw Davies
huw at codeweavers.com
Thu Aug 11 05:32:04 CDT 2016
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/riched20/editor.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 9ec72e2..fb77a67 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1559,8 +1559,9 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
if (!invalidRTF && !inStream.editstream->dwError)
{
+ ME_Cursor start;
+ from = ME_GetCursorOfs(&editor->pCursors[0]);
if (format & SF_RTF) {
- from = ME_GetCursorOfs(&editor->pCursors[0]);
/* setup the RTF parser */
memset(&parser, 0, sizeof parser);
@@ -1662,12 +1663,17 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
style = parser.style;
}
else if (format & SF_TEXT)
+ {
num_read = ME_StreamInText(editor, format, &inStream, style);
+ to = ME_GetCursorOfs(&editor->pCursors[0]);
+ }
else
ERR("EM_STREAMIN without SF_TEXT or SF_RTF\n");
/* put the cursor at the top */
if (!(format & SFF_SELECTION))
ME_SetSelection(editor, 0, 0);
+ ME_CursorFromCharOfs(editor, from, &start);
+ ME_UpdateLinkAttribute(editor, &start, to - from);
}
/* Restore saved undo mode */
--
2.7.4
More information about the wine-patches
mailing list