Merged PR 5193876: Don't hide the cursor until IME starts (ef83aa3c4
)
Make sure we don't hide the cursor until the IME starts (#7673) Some IME implementations do not produce composition strings, and their users have come to rely on the cursor that conhost traditionally left on until a composition string showed up. We shouldn't hide the cursor until we get a string (as opposed to hiding it when composition begins) so as to not break those IMEs. Related to GH-6207. Fixes MSFT-29219348
This commit is contained in:
commit
d1b8d60e16
|
@ -2715,6 +2715,7 @@ WNDCLASSW
|
||||||
Wndproc
|
Wndproc
|
||||||
WNegative
|
WNegative
|
||||||
WNull
|
WNull
|
||||||
|
wnwb
|
||||||
workarea
|
workarea
|
||||||
workaround
|
workaround
|
||||||
workflow
|
workflow
|
||||||
|
@ -2762,6 +2763,7 @@ wtof
|
||||||
wtoi
|
wtoi
|
||||||
wtw
|
wtw
|
||||||
wtypes
|
wtypes
|
||||||
|
Wubi
|
||||||
WUX
|
WUX
|
||||||
WVerify
|
WVerify
|
||||||
wwaproj
|
wwaproj
|
||||||
|
|
|
@ -62,6 +62,10 @@ void ConsoleImeInfo::WriteCompMessage(const std::wstring_view text,
|
||||||
{
|
{
|
||||||
ClearAllAreas();
|
ClearAllAreas();
|
||||||
|
|
||||||
|
// MSFT:29219348 only hide the cursor after the IME produces a string.
|
||||||
|
// See notes in convarea.cpp ImeStartComposition().
|
||||||
|
SaveCursorVisibility();
|
||||||
|
|
||||||
// Save copies of the composition message in case we need to redraw it as things scroll/resize
|
// Save copies of the composition message in case we need to redraw it as things scroll/resize
|
||||||
_text = text;
|
_text = text;
|
||||||
_attributes.assign(attributes.begin(), attributes.end());
|
_attributes.assign(attributes.begin(), attributes.end());
|
||||||
|
|
|
@ -104,8 +104,11 @@ void WriteConvRegionToScreen(const SCREEN_INFORMATION& ScreenInfo,
|
||||||
gci.LockConsole();
|
gci.LockConsole();
|
||||||
auto unlock = wil::scope_exit([&] { gci.UnlockConsole(); });
|
auto unlock = wil::scope_exit([&] { gci.UnlockConsole(); });
|
||||||
|
|
||||||
ConsoleImeInfo* const pIme = &gci.ConsoleIme;
|
// MSFT:29219348 Some IME implementations do not produce composition strings, and
|
||||||
pIme->SaveCursorVisibility();
|
// their users have come to rely on the cursor that conhost traditionally left on
|
||||||
|
// until a composition string showed up.
|
||||||
|
// One such IME is WNWB's "Universal Wubi input method" from wnwb.com (v. 10+).
|
||||||
|
// We shouldn't hide the cursor here so as to not break those IMEs.
|
||||||
|
|
||||||
gci.pInputBuffer->fInComposition = true;
|
gci.pInputBuffer->fInComposition = true;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
Loading…
Reference in a new issue