From 288039481266908e756381b3ed50610fbb7e63a0 Mon Sep 17 00:00:00 2001 From: zonble Date: Thu, 3 Feb 2022 01:49:41 +0800 Subject: [PATCH] Fixes a minor bug on handling backspace key. --- Source/KeyHandler.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/KeyHandler.mm b/Source/KeyHandler.mm index 7820d435..48049838 100644 --- a/Source/KeyHandler.mm +++ b/Source/KeyHandler.mm @@ -720,7 +720,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/McBopomofo-visualization.dot _bpmfReadingBuffer->backspace(); } - if (!_builder->length()) { + if (_bpmfReadingBuffer->isEmpty() && !_builder->length()) { InputStateEmptyIgnoringPreviousState *empty = [[InputStateEmptyIgnoringPreviousState alloc] init]; stateCallback(empty); } else {