Skip to content

Commit

Permalink
输入标点符号时也不自动附加空格
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuwei committed Sep 15, 2022
1 parent 31a2839 commit f68782f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/InputController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}
}
Expand Down Expand Up @@ -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) {
Expand Down

8 comments on commit f68782f

@BenjaminX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还是没有 merge M1 支持打包发版吗?

@dongyuwei
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你之前的PR merge过。这个commit和m1没有关系。中午有空zoom聊一下m1 的支持吗?

@BenjaminX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你之前的PR merge过。这个commit和m1没有关系。中午有空zoom聊一下m1 的支持吗?

ok 的,zoom 号 [email protected]

@dongyuwei
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,12点40可以吗?

@BenjaminX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,12点40可以吗?

ok 的,微信也行的。都在成都其实方便

@dongyuwei
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

@dongyuwei
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zoom 号 [email protected]

无效的?来我这吧:775 429 9281

@BenjaminX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有事儿错过了,sorry。我们再约吧

Please sign in to comment.