fcitx / fcitx5-chewing

17 stars 7 forks source link

all the word will disappear when input more than 18 chinese word #3

Closed l12436 closed 3 years ago

l12436 commented 3 years ago

Describe the bug If the problem is about you can not use fcitx in certain application, or the input window is placed in wrong place, be sure to include which application is being typed, and the output of fcitx5-diagnose command.

To Reproduce Steps to reproduce the behavior:

  1. running "wine notepad"
  2. 測試*20
  3. than you will see the buffer all disappear after around 19 word

Expected behavior it should preserve waiting word or output to application. not disappear

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

l12436 commented 3 years ago

I checkout to latest master, It still disappear after 19 word !? trying on wine notepad

wengxt commented 3 years ago

you need fcitx5 and fcitx5-chewing master

l12436 commented 3 years ago

issue is solve under wine notepad, but still happened on LINE which is also running by wine.... which is does not make sense to me....

wengxt commented 3 years ago

The issue is not in fcitx. I installed line and did some simple test. So here's the things happen: when you type over 20 char, chewing will commit the first char to the applications. In Line specifically, this commit will trigger line to send a Reset signal to input method, which will make input method to clear everything (Clear everything when receive reset signal is the right thing to do from input method point of view, but application shouldn't do that anyway.).

There is nothing I could do about that. Maybe you just live with it or use another implemenation of line (I saw they have chrome extension which should also works for linux).

l12436 commented 3 years ago

The issue is not in fcitx. I installed line and did some simple test. So here's the things happen: when you type over 20 char, chewing will commit the first char to the applications. In Line specifically, this commit will trigger line to send a Reset signal to input method, which will make input method to clear everything (Clear everything when receive reset signal is the right thing to do from input method point of view, but application shouldn't do that anyway.).

There is nothing I could do about that. Maybe you just live with it or use another implemenation of line (I saw they have chrome extension which should also works for linux).

I have some suggestion/idea maybe could make is happen less,

  1. add an option for commit all the word in buffer if word over 20
  2. add an option when user type symbol like ,/。 etc., than send all the word to application if there are other word other than symbol. what do you think ?
wengxt commented 3 years ago

Due to the fact of how it is implemented, please submit such quest to libchewing.

l12436 notifications@github.com于2020年12月11日 周五03:15写道:

The issue is not in fcitx. I installed line and did some simple test. So here's the things happen: when you type over 20 char, chewing will commit the first char to the applications. In Line specifically, this commit will trigger line to send a Reset signal to input method, which will make input method to clear everything (Clear everything when receive reset signal is the right thing to do from input method point of view, but application shouldn't do that anyway.).

There is nothing I could do about that. Maybe you just live with it or use another implemenation of line (I saw they have chrome extension which should also works for linux).

I have some suggestion/idea maybe could make is happen less,

  1. add an option for commit all the word in buffer if word over 20
  2. add an option when user type symbol like ,/。 etc., than send all the word to application. what do you think ?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/fcitx/fcitx5-chewing/issues/3#issuecomment-743134405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7MZF56R7O5575PHITXKTSUH5NTANCNFSM4UVJQQHQ .

l12436 commented 3 years ago

I have found the API, seems call chewing_set_maxChiSymbolLen(), but the fact is chewing is only allow 39 byte, which is around 19 word, and buffer will overflow. I have manually increase to larger number, you may try to use that API to set an option. chewing has protection in chewing_set_maxChiSymbolLen() so it safe when it larger number