Closed lo48576 closed 6 years ago
Rule I set by rom-kana
seems not used during dict edit.
I think the problem is that the custom rule is not used during dict edit.
https://github.com/ueno/libskk/blob/afe959be545d92137377d5e78ef366540ad3bac9/libskk/context.vala#L353-L354 https://github.com/ueno/libskk/blob/afe959be545d92137377d5e78ef366540ad3bac9/libskk/state.vala#L132-L142
When entering to dict edit mode, a new state is created and pushed, but the new state is created with default
rule by default.
This seems to be causing the issue.
I'll write pull request to fix this soon.
Right, thank you for investigating it. I guess the fix itself would be trivial (adding state.typing_rule = typing_rule
in start_dict_edit
), but it would be great if we have a test case too.
Assume that using the keymap rule (
keymap/default.json
) below:Type "P o y o SPC", and you will see
▼ぽよ【】
appears. Then:C-r
, nothing happens.C-c
, nothing happens.C-g
, escaped dictionary edit (▽ぽよ
appeared).At
▽ぽよ
state,C-g
does nothing and bothC-c
andC-g
work as expected (input cancelled).Why
C-g
is treated specially?Additional note in Japanese: 端的な説明: https://mastodon.cardina1.red/@lo48576/99383492999038223
47, #48 を利用して
"Escape": "abort-to-latin-passthrough"
のように設定することで vi-cooperative にしたかったのですが、そもそも辞書登録状態で abort が期待したように動いてなさそうだったため issue を立てました。私もコードを読んでみたのですが、
C-g
をハードコーディングで特別扱いしている箇所は見付からなかったため、何故このような挙動になっているのかわかりませんでした。 何らかの仕掛けで、辞書登録時に "abort" コマンドでなく "C-g" キーのみが影響を及ぼすようになっているのでしょうか?