chewing / libchewing

libchewing - The intelligent phonetic input method library
https://chewing.im/
GNU Lesser General Public License v2.1
356 stars 89 forks source link

chewing_set_phraseChoiceRearward and chewing_set_autoLearn resets EditorOptions to default #570

Closed kanru closed 1 month ago

kanru commented 1 month ago

Describe the bug

After calling chewing_set_autoLearn or chewing_set_phraseChoiceRearward, previous set options are reset to default.

To Reproduce

Set any options like chewing_set_maxChiSymbolLen(ctx, 10), then set chewing_set_autoLearn(ctx, 1).

Observe that chewing_get_maxChiSymbolLen(ctx) returns 39 instead of 10.

Expected behavior

Existing options should be preserved.

Platform (please complete the following information):

Additional context

https://g0v.social/@hiroshiyui/112507822515619817

Might be fixed by #566 but we should issue a hotfix for the 0.8.x branch.