diff --git a/src/InputController.mm b/src/InputController.mm index d1fd3d1..e369601 100644 --- a/src/InputController.mm +++ b/src/InputController.mm @@ -91,7 +91,7 @@ - (BOOL)onKeyEvent:(NSEvent *)event client:(id)sender { if (keyCode == KEY_RETURN) { if (hasBufferedText) { - [self commitCompositionWithEnter:sender]; + [self commitCompositionWithoutSpace:sender]; return YES; } return NO; @@ -132,7 +132,7 @@ - (BOOL)onKeyEvent:(NSEvent *)event client:(id)sender { if ([[NSCharacterSet decimalDigitCharacterSet] characterIsMember:ch]) { if (!hasBufferedText) { [self appendToComposedBuffer:characters]; - [self commitComposition:sender]; + [self commitCompositionWithoutSpace:sender]; return YES; } @@ -158,7 +158,7 @@ - (BOOL)onKeyEvent:(NSEvent *)event client:(id)sender { if ([[NSCharacterSet punctuationCharacterSet] characterIsMember:ch] || [[NSCharacterSet symbolCharacterSet] characterIsMember:ch]) { if (hasBufferedText) { [self appendToComposedBuffer:characters]; - [self commitComposition:sender]; + [self commitCompositionWithoutSpace:sender]; return YES; } } @@ -216,7 +216,7 @@ - (void)commitComposition:(id)sender { [self reset]; } -- (void)commitCompositionWithEnter:(id)sender { +- (void)commitCompositionWithoutSpace:(id)sender { NSString *text = [self composedBuffer]; if (text == nil || [text length] == 0) {