Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/riched20/editor.c | 4 +--- dlls/riched20/txthost.c | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 217394eaafb..6532f7c65cb 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3969,10 +3969,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, case WM_GETTEXTLENGTH: { GETTEXTLENGTHEX how; - - /* CR/LF conversion required in 2.0 mode, verbatim in 1.0 mode */ how.flags = GTL_CLOSE | (editor->bEmulateVersion10 ? 0 : GTL_USECRLF) | GTL_NUMCHARS; - how.codepage = unicode ? CP_UNICODE : CP_ACP; + how.codepage = CP_UNICODE; return ME_GetTextLengthEx(editor, &how); } case EM_GETTEXTLENGTHEX: diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 064ce3fb827..e401759991f 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -801,6 +801,15 @@ static LRESULT RichEditWndProc_common( HWND hwnd, UINT msg, WPARAM wparam, FillRect( hdc, &rc, editor->hbrBackground ); return 1; } + case WM_GETTEXTLENGTH: + { + GETTEXTLENGTHEX params; + + params.flags = GTL_CLOSE | (host->emulate_10 ? 0 : GTL_USECRLF) | GTL_NUMCHARS; + params.codepage = unicode ? CP_UNICODE : CP_ACP; + hr = ITextServices_TxSendMessage( host->text_srv, EM_GETTEXTLENGTHEX, (WPARAM)¶ms, 0, &res ); + break; + } case WM_PAINT: { HDC hdc;