在 2019年10月30日 +0800 AM3:20,Alan Third <alan@idiocy.org>,写道:

I think in C we can get away with just checking whether the new text
is empty. If there is any text at all then replacing the working text
seems to do the right thing, even if the new text is shorter than the
old. I could be wrong, though, I’ve never really used these input
methods so don’t know if there are things I’m not testing.

New patch attached, please try it and let me know how it goes.
--
Alan Third 

It works perfectly now. Thanks.