librime icon indicating copy to clipboard operation
librime copied to clipboard

Editor's `back_syllable` removes multiple syllables when selecting a shorter candidate

Open EtaoinWu opened this issue 7 months ago • 1 comments

Describe the bug When multiple syllables are typed and the selector is used to select a shorter candidate, this would leave some unused syllables un-highlighted.

Illustration of the bug condition

If the back_syllable action of the editor is invoked, for example by hitting {Control+BackSpace}, all the unhighlighted syllables (in this case shu'ru) are removed, instead of only one of them.

To Reproduce Steps to reproduce the bug:

  1. This should happen also on the default configuration with stock luna_pinyin. I tested this on weasel 0.16.1 and librime 1.11.2.
  2. Type ce'shi'shu'ru.
  3. Use {Down} until you select the word 測試.
  4. Hit {Control+BackSpace} to invoke back_syllable and observe that shu'ru is removed, leaving only ce'shi in the input.

Expected behavior Only one syllable (in our case shi) shall be removed.

Flavor(please complete the following information): Select your flavor:

  • [x] Weasel 0.16.1

Package:

  • OS: Windows 11 version 22H2 build 22621.3672
  • Version: librime 1.11.2

EtaoinWu avatar Jul 05 '24 00:07 EtaoinWu