ibus-rime icon indicating copy to clipboard operation
ibus-rime copied to clipboard

allow hide candidate list by rime option _hide_candidate

Open MokOopsing opened this issue 2 weeks ago • 1 comments

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
  1. When _hide_candidate is 1, the candidate list remains empty and the candidate window stays hidden.
  2. Default behavior remains unchanged (candidates are shown unless explicitly hidden).
  3. No impact on existing configurations.
  4. The _hide_candidate option is optional and off by default.
  5. Fully compatible with existing themes and styles.
  6. With this option, user can dynamic control candidates list by librime-lua script.

The same feature has been merged into Squirrel via #1073

MokOopsing avatar Dec 11 '25 06:12 MokOopsing

這個實現不太環保。

每次顯示候選字都要先查這個選項,要做兩次 map 查詢(Session、Option)。影響了不開這個選項時的性能!

lotem avatar Dec 13 '25 02:12 lotem