This only affects ME_SetText and fnTextSrv_TxSetText,
should make it a bit more readable.
dlls/riched20/caret.c | 2 --
dlls/riched20/editor.c | 4 +++-
dlls/riched20/txtsrv.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 26af743518..94794890b6 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -526,8 +526,6 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
assert(style);
assert(nCursor>=0 && nCursor<editor->nCursors);
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 1ce444e604..8873861aee 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -3323,7 +3323,9 @@ static void ME_SetText(ME_TextEditor *editor, void *text, BOOL unicode)
int len = -1;
/* uses default style! */
- if (!(editor->styleFlags & ES_MULTILINE))
- if (editor->styleFlags & ES_MULTILINE)
len = lstrlenW(wszText);
- else
{
WCHAR *p = wszText;
diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
index 307b484352..a21ef5a02f 100644
--- a/dlls/riched20/txtsrv.c
+++ b/dlls/riched20/txtsrv.c
@@ -288,7 +288,7 @@ DECLSPEC_HIDDEN HRESULT WINAPI fnTextSrv_TxSetText(ITextServices *iface, LPCWSTR
ME_SetCursorToStart(This->editor, &cursor);
ME_InternalDeleteText(This->editor, &cursor, ME_GetTextLength(This->editor), FALSE);
if(pszText)
ME_InsertTextFromCursor(This->editor, 0, pszText, -1, This->editor->pBuffer->pDefaultStyle);
ME_InsertTextFromCursor(This->editor, 0, pszText, lstrlenW(pszText), This->editor->pBuffer->pDefaultStyle);
ME_SetSelection(This->editor, 0, 0);
This->editor->nModifyStep = 0;
OleFlushClipboard();
I'm not convinced this is an improvement.
Huw.