Closed wcq062821 closed 1 year ago
最近拿citre做后端,糊了一个在emacs最下方显示变量定义的工具, 由于空闲0.5s后就要去拿光标下的symbol的定义, 当光标频繁移动的时候,就会频繁调用 citre-get-definitions ,这个函数经常会崩溃, 最后debug 到是卡在下面这一段 (while (not finished) (accept-process-output)) 所以加了个with-timeout
citre-get-definitions
(while (not finished) (accept-process-output))
I think this is not the best solution.
You could wrap citre-get-definitions in while-no-input. See the implementation of citre-capf--get-collection.
while-no-input
citre-capf--get-collection
It works fine, Thanks! Dalao :)
最近拿citre做后端,糊了一个在emacs最下方显示变量定义的工具, 由于空闲0.5s后就要去拿光标下的symbol的定义, 当光标频繁移动的时候,就会频繁调用
citre-get-definitions
,这个函数经常会崩溃, 最后debug 到是卡在下面这一段(while (not finished) (accept-process-output))
所以加了个with-timeout