KeyHandler // Use compositor.isEmpty in handleEsc().

This commit is contained in:
ShikiSuen 2022-06-30 23:20:31 +08:00
parent 40ad331784
commit 2367e91840
1 changed files with 3 additions and 8 deletions

View File

@ -605,15 +605,10 @@ extension KeyHandler {
clear()
stateCallback(InputState.EmptyIgnoringPreviousState())
} else {
if composer.isEmpty { return true }
///
if !composer.isEmpty {
composer.clear()
if compositorLength == 0 {
stateCallback(InputState.EmptyIgnoringPreviousState())
} else {
stateCallback(buildInputtingState)
}
}
composer.clear()
stateCallback(compositor.isEmpty ? InputState.EmptyIgnoringPreviousState() : buildInputtingState)
}
return true
}