mirror of
https://github.com/fcitx5-android/fcitx5-android.git
synced 2026-08-02 20:16:06 +08:00
优化删除键上滑手势的清空逻辑,增加对编辑状态的判断,确保在有拼音输入时仅丢弃当前输入,而非清空全部内容。
This commit is contained in:
parent
a88fa54ed8
commit
d8bd43df5e
@ -164,7 +164,13 @@ class CommonKeyActionListener :
|
||||
}
|
||||
is ClearAllAction -> {
|
||||
backspaceSwipeState = Stopped
|
||||
service.clearEditorText()
|
||||
if (preeditState.isEmpty) {
|
||||
// No composing/preedit: clear entire editor content
|
||||
service.clearEditorText()
|
||||
} else {
|
||||
// Composing present (e.g., pinyin in-progress): discard composition only
|
||||
service.postFcitxJob { reset() }
|
||||
}
|
||||
}
|
||||
is PickerSwitchAction -> {
|
||||
// update lastSymbolType only when specified explicitly
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user