From: Kenichi H. <ha...@m1...> - 2004-11-02 05:30:11
|
In article <20041102040301.GA3385%ss...@sh...>, Seiichi SATO <ss...@sh...> writes: > Sorry for my late reply. > On Fri, Oct 29, 2004 at 08:50:03AM +0900, > Kenichi Handa wrote: >> When I type 'a' while activating m17nlib:ja:anthy, あ is >> shown with underline. But, when I type Shift-SPC to turn >> the input method off, あ is still shown with underline and >> not sent to terminal. I think that preedit text should be >> fixed and sent to terminal before turning off the input >> method. > I think that there are three ways for turning off IM in preediting. > A) ignore request for switching mode (uim) > B) clear current preedit text (MS-IME, IIIMF, kinput2, skkinput) > C) commit current preedit text (nabi, Handa-san's opinion) > (I don't know which way is the most useful...) > A is easy to implement for me, but B and C are hard. In cases of > B and C, preedit must be cleared, but it seems that m17n-lib does > not provide API for it (except for re-creating MInputContext). > If I understand correctly, I'll adopt A. If you want to perform B or C without destroying MInputContext, for B, you can use minput_toggle, and for C, you can directly access the M-text in MInputContext->preedit to retrieve the current preedit text. It's also possible to get only a subrange of preedit text before `in-preedit-cursor' by checking MInputContext->cursor_pos. --- Ken'ichi HANDA ha...@m1... |