A complete Japanese reading showed its candidates with the first row highlighted, yet Enter committed the reading unless the user had moved to a candidate: the highlight lied. Now sel is -1 while nothing is chosen, and it alone says what Enter commits; candidatechosen goes. Every key that ends a composition — Enter, Tab, a language switch, a special key, a modifier chord, typing on — now commits the chosen candidate through one flush; before, only Enter and Tab did, and Ctrl+S after choosing 漢字 committed かんじ. Space in a Japanese mode is the conversion key, as in every other Japanese IME: it steps through the candidates (Shift+Space backwards, both wrapping) and commits a reading that has none, without typing a space. Backspace and Escape on a chosen candidate go back to the reading first. Tab in a search wraps through the same cyclekouho. reset() no longer forgets the caret: a chosen candidate confirmed by typing on would otherwise redraw the next reading at the pointer.
15 KiB
15 KiB