ibus-rime
ibus-rime copied to clipboard
allow hide candidate list by rime option _hide_candidate
This pull request introduces the ability to control whether the candidate list is displayed through a Rime option (_hide_candidate). This feature was originally implemented in Trime.
When the option is enabled, Ibus-rime will skip populating and drawing the candidate list, allowing users or schemas to dynamically hide candidates without relying on theme configuration.
Usage Example
#in xxx.schema.yaml or xxx.custom.yaml
switches:
- name: _hide_candidate
reset: 1
- When _hide_candidate is 1, the candidate list remains empty and the candidate window stays hidden.
- Default behavior remains unchanged (candidates are shown unless explicitly hidden).
- No impact on existing configurations.
- The _hide_candidate option is optional and off by default.
- Fully compatible with existing themes and styles.
- With this option, user can dynamic control candidates list by librime-lua script.
The same feature has been merged into Squirrel via #1073
這個實現不太環保。
每次顯示候選字都要先查這個選項,要做兩次 map 查詢(Session、Option)。影響了不開這個選項時的性能!