Skip to content

Commit

Permalink
fix issues/52
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuwei committed Feb 17, 2021
1 parent fe926ba commit 3371443
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/InputController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ - (void)commitComposition:(id)sender {

if (commitWordWithSpace && text.length > 0) {
char firstChar = [text characterAtIndex:0];
if (![[NSCharacterSet decimalDigitCharacterSet] characterIsMember:firstChar]) {
char lastChar = [text characterAtIndex:text.length - 1];
if (![[NSCharacterSet decimalDigitCharacterSet] characterIsMember:firstChar] && lastChar != '\'') {
text = [NSString stringWithFormat:@"%@ ", text];
}
}
Expand Down

0 comments on commit 3371443

Please sign in to comment.