mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
232 stars 16 forks source link

[BUG] Preedit contents sometimes look different in ibus-typing-booster compared to ibus-m17n #460

Closed mike-fabian closed 1 year ago

mike-fabian commented 1 year ago

ibus-typing-booster sometimes shows slightly wrong contents of the preedit compared to ibus-m17n which seems to show the correct contents in the preedit always.

This is quite rare but one of these differences can be seen when using hi-itrans.

To reproduce, use ibus-typing-booster and ibus-m17n with the hi-itrans input method and the option trim-last-halant is set to 1 (which is the default). trim-last-halant set to 1 is important, otherwise the procedure to reproduce the problem will show no difference.

First ibus-m17n:

Typing n in ibus-m17n shows न् U+0928 DEVANAGARI LETTER NA U+094D DEVANAGARI SIGN VIRAMA in the preedit.

When a space is typed then, the code

(second
  ...
  (nil (cond (trim-last-halant (move LAST-HALANT-POS) (delete @-) (move @>)))
       (shift init)))

removes the ् U+094D DEVANAGARI SIGN VIRAMA and only न U+0928 DEVANAGARI LETTER NA is committed.

OK.

Now the same in ibus-typing-booster:

Typing n in ibus-typing-booster shows only न U+0928 DEVANAGARI LETTER NA, the virama is not shown. When a space is typed then, न U+0928 DEVANAGARI LETTER NA is committed.

To get न् U+0928 DEVANAGARI LETTER NA U+094D DEVANAGARI SIGN VIRAMA committed as the final result, one can type n + S-C-Return both in ibus-m17n and ibus-typing-booster (>= 2.23.4!).

After a commit happened, the result is always the same in ibus-m17n and ibus-typing-booster, but while the preedit is still active, ibus-typing-booster sometimes shows wrong contents of the preedit.

Here is a video showing this:

https://github.com/mike-fabian/ibus-typing-booster/assets/2330175/a7e58893-87ab-4ab1-8199-96ee557dc38f