fcitx / fcitx5-unikey

33 stars 10 forks source link

Selection should be deleted when typing #10

Closed trmdi closed 2 years ago

trmdi commented 2 years ago

I remember on fcitx4 when you're selecting a text then type, the selection will be removed. But in fcitx5 it doesn't work like that it should.

image

trmdi commented 2 years ago

This happens on Kate but not on Firefox. Tested on 5.0.6

wengxt commented 2 years ago

I just test it, it's exact same. When preedit is used, the selection will be replaced only after commit string happens.

trmdi commented 2 years ago

I just test it, it's exact same. When preedit is used, the selection will be replaced only after commit string happens.

The selection should be removed right after you type the first character "g" without committing. In Firefox, Dolphin it works like that. Do you mean it works like I expect on your Kate ? or that is your intention?

trmdi commented 2 years ago

Here are some videos: 1, Kate (should not work like this) ezgif com-gif-maker 2, Dolphin (should work like this) ezgif com-gif-maker(1)

wengxt commented 2 years ago

I’m saying it’s same for fcitx4/5, not saying it’s different from your case.

The behavior is mainly implementation defined in different toolkit.

kate implementation is not regular qt widget, but it’s own widget, so it’s not a surprise that they behave differently.

trmdi commented 2 years ago

I’m saying it’s same for fcitx4/5,

Ah, sorry about that. My bad.

wengxt commented 2 years ago

I sent a PR to ktexteditor.

https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/225