doNothingWhenThereIsNoSelection function
ExecutionInstruction
doNothingWhenThereIsNoSelection({
- required SuperEditorContext editContext,
- required KeyEvent keyEvent,
Implementation
ExecutionInstruction doNothingWhenThereIsNoSelection({
required SuperEditorContext editContext,
required KeyEvent keyEvent,
}) {
if (keyEvent is! KeyDownEvent && keyEvent is! KeyRepeatEvent) {
return ExecutionInstruction.continueExecution;
}
if (editContext.composer.selection == null) {
return ExecutionInstruction.haltExecution;
} else {
return ExecutionInstruction.continueExecution;
}
}