fix: 予測候補を Tab で受け入れても、窓に出ていた候補が無視される問題を修正 - #362
Open
shiina-archelon wants to merge 1 commit into
Open
Conversation
Member
|
すみません、この修正をazooKey-Desktopのレイヤーでやるのは変なので、AzooKeyKanaKanjiConverter側で対応したいです。具体的には、AzooKeyKanaKanjiConverterが持っているprefix constraintをタブ予測候補で保管するような形があり得ると思います。 |
Author
|
@ensan-hcl 回答ありがとうございます。
別リポジトリの方は、APIメソッド追加してprefix constraint編集して、変換部分ごにょごにょしたら(たぶん)動いているのであっちにPR出します。 |
shiina-archelon
force-pushed
the
fix/prediction-candidate-mismatch
branch
from
September 2, 2026 04:03
e2a9621 to
addbda6
Compare
Author
|
@ensan-hcl -- Converter 側に azooKey/AzooKeyKanaKanjiConverter#357 を出しました。それを呼ぶだけの形に差し替えています。 変えたところ
注意点Core/Package.swift は、AzooKeyKanaKanjiConverter 側が固まらないと正しく書けないので、そのままにしてあります。したがって、正しい値を入れるまで、この branch は build できません。 確認 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #361
修正
Tab を押したとき、その時点で窓に出ていた候補の表記を
SegmentsManagerが覚えておき、marked text を決めるときにそれを使う。SegmentsManager.acceptedPredictionDisplayTextに、Tab を押した時点で窓に出ていた候補のdisplayTextを持つgetCurrentMarkedTextで、この値があればライブ変換の第一候補より優先して表示する。Enter で確定されるのもこの表記になるlastOperationのdidSetで値を捨てる。次の入力・削除・文節編集が起きた時点で固定が外れるdeleteCount分の削除とappendTextの挿入) をConverterServer+KeyEventからSegmentsManager.acceptPredictionCandidateへ移し、表記を覚えるのと同じ場所で行う確認
swift testpassswiftlint --strictpassひだと打ち、予測候補の窓に←が出た状態で Tab を押すと、変換中テキストが←になり、Enter で←が確定された