chewing/chewing-editor

Failed on 2 or more spaces between the bopomofo of word

Opened this issue · 9 comments

when I type "天將降大人於斯人也", this word will be cut into 3 words.(including "天將降大任於" & "斯人" & "也")
and I though I can edit "天將降大任於" and make it to be "天將降大人於斯人也".
However,it doesn't work. The word's still "天將降大任於" .

111111

222222

p.s. there is a space between each word's bopomofo during editing the word. issue98

Cannot edit the word which is more than 6 characters longer

Could you provide debug message from console and the phrase with bopomofo you typed?

I added the phrase with master build successful.

image

I knew it works when adding a new word with master.
If I modify(修改) a word which is already existed and consists of six characters(天將降大任於), it still shows success but not right answer(天將降大任於,not天將降大任於斯人也).

jserv commented

@yachiyang01, Please check the debugging messages generated by chewing-editor -d and look for related operations. We need to know more about program behavior.

Hi. I upload the messages.
debug

jserv commented

@yachiyang01 , you should attach text messages as possible as you can since developers would like to figure out by searching certain words.

@jserv Okay.

I was modifying "天將降大任於" to "天將降大任於斯人也" and add "ㄙ ㄖㄣˊ ㄧㄝˇ" in the bopomofo.
I just found it isn't modified successfully because of "ㄙ ". I type 2 space between "ㄙ" and "ㄖㄣˊ".
If I just type 1 space between them, it works!

02

jserv commented

Good! Let's clarify the subject to be more precise. If key stroke sequence contains space which means vocal intensity in Bopomofo, chewing-editor would suffer from unexpected discard with phrases. @yachiyang01, can you verify my understanding and revise the subject of this issue?

I think the conclusion @jserv made is right. It happens not only modifying a phrase but also adding a new phrase.I try to add the new phrase "哈囉" and the bopomofo is "ㄏㄚ ㄌㄨㄛ" (one space between "ㄏㄚ" and "ㄌㄨㄛ").It's fine.
However, when I add the new phrase "嗨你好" and the bopomofo is "ㄏㄞ ㄋㄧˇ ㄏㄠˇ" (2 spaces between "ㄏㄞ" and "ㄋㄧˇ"), it fails.

2-1
2-2

I will trace the code and do my best to revise it!

@jserv @yachiyang01 Since the reason is declared now, I'm going to change the subject to "Failed on 2 or more spaces between the bopomofo of word" (Original "Cannot edit the word which is more than 6 characters longer")