After adding the Simplified Chinese input method in macOS System Settings > Keyboard Settings, when entering Chinese in Emacs (latest code from the master branch), the candidate box appears in the bottom-left corner of the screen. When multiple screens are used, the candidate box will appear in the bottom-left corner of the main display. The issue can also be reproduced using the built-in Chinese input method on MacOS. The screenshot below shows the effect of using the built-in Simplified Chinese input method, where the candidate box appears in the bottom right corner of the screen. Normally, it should follow the input cursor. [image: image.png] Gerd Möllmann 于2024年8月3日周六 12:28写道: > Gerd Möllmann writes: > > > Lucius Chen writes: > > > >> Rime input method. https://github.com/rime/squirrel > >> > >> 在 2024年8月3日星期六,Gerd Möllmann 写道: > >> > >> Lucius Chen writes: > > > > (Please use Reply to All when responding, so that the bug list is kept > > informed.) > > > > Thanks for the link. Alas I can't read Chinese, and the automatic > > translation of the page isn't helpful. > > > > Can you please describe a way how to reproduce this for some non-Chinese > > guy like me? And preferrably using built-in macOS means instead of > > third-party software? > > > > TIA > > Hm, could you also please try with this change? > > 1 file changed, 1 insertion(+), 1 deletion(-) > src/nsterm.m | 2 +- > > modified src/nsterm.m > @@ -7081,7 +7081,7 @@ - (void) setMarkedText: (id) string > - (NSRect) firstRectForCharacterRange: (NSRange) range > actualRange: (nullable NSRangePointer) > actualRange > { > - return NSZeroRect; > + return [self firstRectForCharacterRange: range]; > } > > #endif /* NS_IMPL_COCOA */ >