engine: an okurigana mark does not outlive its kana

Shift on a romaji letter marks where the okurigana begins, and Backspace
shortened the reading through im.l->back without clearing the mark.
dictqjp only applies a mark that still falls inside the reading, so the
stale index lay dormant while the reading was short and fired again the
moment it grew back past it: kaKu, Backspace, then nzi offered
噛んじ 兼んじ 漢字 幹事 感じ, where kanzi typed plainly offers 漢字 first.
A Backspace edits the reading, so the split marked in it is gone.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-18 16:03:15 +09:00
parent d3d46c8cb1
commit 08d0e0fec8
2 changed files with 8 additions and 0 deletions

View File

@@ -970,6 +970,7 @@ transition(u32int ks, u32int mod, Str *com)
else if(ks == Kesc)
reset();
else{
okuriat = -1; /* the mark goes with the kana it marked */
im.l->back(&im);
if(haspre(&im))
dictqjp();