-
Notifications
You must be signed in to change notification settings - Fork 614
Closed
Labels
Description
Describe the bug
delete_candidate
and delete_candidate_on_current_page
ignore index
and always delete highlighted candidate.
To Reproduce
- In luna-pinyin, commit 2 words with the same pinyin and not in dict.
- Right click the 2nd one on f5m or long press the 2nd one on f5a.
- Forget word.
- The 1st word is gone.
Expected behavior
The 2nd word is gone.
Log
I20240619 12:02:23.835766 0x170437000 context.cc:152] Deleting candidate: '苫次
I20240619 12:02:23.835961 0x170437000 memory.cc:127] deleting entry: '善此'.
I20240619 12:02:23.836090 0x170437000 level_db.cc:182] update db entry: shan ci 善此 => c=-1 d=0.99005 t=3
Flavor(please complete the following information):
- fcitx5-rime (macOS)
- fcitx5-rime (Android)
Additional context
Candidate info is clearly lost:
Lines 151 to 154 in a4f24fd
if (auto cand = get_candidate(seg)) { | |
DLOG(INFO) << "Deleting candidate: '" << cand->text(); | |
delete_notifier_(this); | |
return true; // CAVEAT: this doesn't mean anything is deleted for sure |
Always delete selected:
librime/src/rime/gear/memory.cc
Lines 123 to 124 in a4f24fd
auto phrase = | |
As<Phrase>(Candidate::GetGenuineCandidate(ctx->GetSelectedCandidate())); |