File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ public func commitAndSetPreeditSync(
4848 // is both processed by IM and passed to client in iTerm, so we force a
4949 // dummy client preedit here.
5050 // Some apps also need it to get accurate cursor position to place candidate window.
51- // But when there is selected text, we don't want the dummy preedit to clear all of
52- // them. An example is using Shift+click to select but IM switch happens.
53- if preedit. isEmpty && dummyPreedit && client. selectedRange ( ) . length == 0 {
51+ // This is fine even when there is selected text. In Word, not using dummy preedit to
52+ // replace selected text will let Esc bypass IM. When using Shift+click to select, if
53+ // interval is too little, IM switch happens, but dummyPreedit is false in that case.
54+ if preedit. isEmpty && dummyPreedit {
5455 setPreedit ( client, zeroWidthSpace, 0 )
5556 } else {
5657 setPreedit ( client, preedit, cursorPos)
You can’t perform that action at this time.
0 commit comments