-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
通过 switcher 切换 option state 后,无法获取 option state 对应的值 #918
Labels
Comments
imfuxiao
added a commit
to imfuxiao/librime
that referenced
this issue
Jul 19, 2024
…ion under the switcher (rime#918)
imfuxiao
added a commit
to imfuxiao/librime
that referenced
this issue
Jul 19, 2024
…ion under the switcher (rime#918)
imfuxiao
added a commit
to imfuxiao/librime
that referenced
this issue
Jul 19, 2024
…ion under the switcher (rime#918)
imfuxiao
changed the title
通过 switcher 下切换 option 后,无法获取 option state 对应的值
通过 switcher 切换 option state 后,无法获取 option state 对应的值
Jul 19, 2024
Timing issue. |
lotem
added a commit
to lotem/librime
that referenced
this issue
Jul 20, 2024
lotem
added a commit
to lotem/librime
that referenced
this issue
Jul 20, 2024
imfuxiao
pushed a commit
to imfuxiao/librime
that referenced
this issue
Jul 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
比如 F4 进入 Switcher 后,切换 option 状态(非 schema),如 ascii_mode 的状态,切换成功后,比如在 notification_handler 获取到切换状态通知后,在获取 option 对的值
rime->get_state_label(session_id, option_name, state)
是无法获取的。相反,如果不通过 Switcher 切换,直接通过
rime->set_option(session_id, option, is_on)
切换 option,同样在 notification_handler 获取到切换状态通知后,在获取 option 对的值rime->get_state_label(session_id, option_name, state)
是可以获取到的。To Reproduce
Steps to reproduce the bug:
rime->get_state_label(session_id, option_name, state)
得到的值是空值。Expected behavior
期望通过 switcher 切换 option 与 通过
rime->set_option()
api 切换 option 后,都可以正常获取到 option 对应的值。Additional context
查阅代码,得知
active_engine
RimeGetStateLabelAbbreviated()
会使用active_engine
active_engine
获取到的 schema 不是当前正在使用的 schema,而是default
的配置,从而导致获取 option 选项的值为空。而通过rime->set_option()
设置,engine_->active_engine()->schema()
获取到的 schema 是正在使用的 schema,所以可以正常拿到 option 的值。The text was updated successfully, but these errors were encountered: