Commit 8662c6fe authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Implement EM_GETTEXTMODE.

The text mode is already stored, and EM_SETTEXTMODE already exists. There was however a bug in EM_MakeEditor that could cause TM_PLAINTEXT and TM_RICHEDIT to be set at the same time. This was corrected to ensure EM_GETTEXTMODE returned the proper mode being used.
parent 1a3551b6
......@@ -69,7 +69,7 @@
! - EM_GETTHUMB
+ EM_GETTEXTEX 2.0
+ EM_GETTEXTLENGTHEX (GTL_PRECISE unimplemented)
- EM_GETTEXTMODE 2.0
+ EM_GETTEXTMODE 2.0
? + EM_GETTEXTRANGE (ANSI&Unicode)
- EM_GETTYPOGRAPHYOPTIONS 3.0
- EM_GETUNDONAME
......@@ -2680,7 +2680,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
ed->bHideSelection = FALSE;
ed->pfnWordBreak = NULL;
ed->lpOleCallback = NULL;
ed->mode = TM_RICHTEXT | TM_MULTILEVELUNDO | TM_MULTICODEPAGE;
ed->mode = TM_MULTILEVELUNDO | TM_MULTICODEPAGE;
ed->mode |= (props & TXTBIT_RICHTEXT) ? TM_RICHTEXT : TM_PLAINTEXT;
ed->AutoURLDetect_bEnable = FALSE;
ed->bHaveFocus = FALSE;
......@@ -2999,7 +2999,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
UNSUPPORTED_MSG(EM_SETIMESTATUS)
UNSUPPORTED_MSG(EM_GETLANGOPTIONS)
UNSUPPORTED_MSG(EM_GETREDONAME)
UNSUPPORTED_MSG(EM_GETTEXTMODE)
UNSUPPORTED_MSG(EM_GETTYPOGRAPHYOPTIONS)
UNSUPPORTED_MSG(EM_GETUNDONAME)
UNSUPPORTED_MSG(EM_GETWORDBREAKPROCEX)
......@@ -4290,6 +4289,8 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
editor->pfnWordBreak = (EDITWORDBREAKPROCW)lParam;
return (LRESULT)pfnOld;
}
case EM_GETTEXTMODE:
return editor->mode;
case EM_SETTEXTMODE:
{
LRESULT ret;
......
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