Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around for MS Word's rejecting sync edit sessions
This is a workaround for Microsoft Word's suddenly stopping accepting synchronous edit sessions after moving ruler UI. While MS Word's stack trace after entering the failure mode strongly implies that this is an unexpected behavior in Microsoft Word [1], realistically Mozc needs to work around this by avoiding synchronous edit sessions whenever possible as TSF team has recommended [2]. Also MS-IME in Windows 11 22H2 does use asynchronous edit sessions even from the key event handler unless "Use previous version of Microsoft IME" settings is enabled. This means that stopping relying on synchronous edit sessions in Mozc also benefits the general app compatibility. The problem is that redesigning edit session handling is a relatively big project [3]. As a quick workaround, this commit aims to address the main typing issue in MS Word by tweaking 'OnOutputReceivedImpl'. The following features remains to be unavailable in the failure mode. * Reconversion triggered from IMEs. * Undo-commit Closes google#819 with known issues. [1]: google#819 [2]: https://learn.microsoft.com/en-us/archive/blogs/tsfaware/rules-of-text-services [3]: google#821 PiperOrigin-RevId: 573696936
- Loading branch information