> On Nov 4, 2022, at 15:16, Po Lu <luangruo@yahoo.com> wrote: > > Kai Ma <justksqsf@gmail.com> writes: > >> Iâve narrowed the problem further to [firstRectForCharRange]. > > I'm either blind, or there is no method by that name... firstRectForCharacterRange. > >> Some calls never return. Activating an input method makes Emacs issue >> excessive calls to this method. Specifically, the following code gets >> stuck somewhere. >> >> if (WINDOWP (echo_area_window) && ! NILP (call0 (intern >> ("ns-in-echo-area")))) >> win = XWINDOW (echo_area_window); >> else >> win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe)); > > So Emacs completely locks up in that function (ns-in-echo-area)? Yes and no. Emacs still responds to new key events, but a previous call is stuck and does not return. Presumably in another thread. To be more clear: changing that code to be static int enter_cnt, leave_cnt; enter_cnt++; [referenced piece of code] leave_cnt++; /* (Or just count the return/leave counts of (ns-in-echo-area).) */ leave_cnt can be less than enter_cnt. Iâve confirmed re-entrance to [firstRectForCharacterRange] leads to the problem. Pardon my ignorance, is there any reason to special-case the echo area? Simply let win = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe)) and the problem is gone.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4