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() clear()
stateCallback(InputState.EmptyIgnoringPreviousState()) stateCallback(InputState.EmptyIgnoringPreviousState())
} else { } else {
if composer.isEmpty { return true }
/// ///
if !composer.isEmpty { composer.clear()
composer.clear() stateCallback(compositor.isEmpty ? InputState.EmptyIgnoringPreviousState() : buildInputtingState)
if compositorLength == 0 {
stateCallback(InputState.EmptyIgnoringPreviousState())
} else {
stateCallback(buildInputtingState)
}
}
} }
return true return true
} }