Skip to content

Commit 20ef442

Browse files
committed
Fixes the indents.
1 parent ad9bee5 commit 20ef442

1 file changed

Lines changed: 43 additions & 43 deletions

File tree

Source/KeyHandler.mm

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,16 +1344,16 @@ - (BOOL)_handleCandidateState:(InputState *)state
13441344
isCursorMovingRight = input.isRight;
13451345
} else {
13461346
switch (Preferences.allowMovingCursorWhenChoosingCandidates) {
1347-
case MovingCursorKeyUseJK:
1348-
isCursorMovingLeft = [input.inputText isEqualToString:@"j"];
1349-
isCursorMovingRight = [input.inputText isEqualToString:@"k"];
1350-
break;
1351-
case MovingCursorKeyUseHL:
1352-
isCursorMovingLeft = [input.inputText isEqualToString:@"h"];
1353-
isCursorMovingRight = [input.inputText isEqualToString:@"l"];
1354-
break;
1355-
default:
1356-
break;
1347+
case MovingCursorKeyUseJK:
1348+
isCursorMovingLeft = [input.inputText isEqualToString:@"j"];
1349+
isCursorMovingRight = [input.inputText isEqualToString:@"k"];
1350+
break;
1351+
case MovingCursorKeyUseHL:
1352+
isCursorMovingLeft = [input.inputText isEqualToString:@"h"];
1353+
isCursorMovingRight = [input.inputText isEqualToString:@"l"];
1354+
break;
1355+
default:
1356+
break;
13571357
}
13581358
}
13591359

@@ -1425,39 +1425,39 @@ - (BOOL)_handleCandidateState:(InputState *)state
14251425
if (isPlusKey) {
14261426
InputStateCustomMenuEntry *boost = [[InputStateCustomMenuEntry alloc] initWithTitle:NSLocalizedString(@"Boost", @"")
14271427
callback:^{
1428-
__strong __typeof(weakSelf) strongSelf = weakSelf;
1429-
if (!strongSelf) {
1430-
return;
1431-
}
1432-
[strongSelf.delegate keyHandler:strongSelf didRequestBoostScoreForPhrase:candidate.value reading:reading];
1433-
[strongSelf.delegate keyHandlerDidRequestReloadLanguageModel:strongSelf];
1434-
[strongSelf _walk];
1435-
InputStateInputting *inputting = (InputStateInputting *)[strongSelf buildInputtingState];
1436-
stateCallback(inputting);
1437-
}];
1428+
__strong __typeof(weakSelf) strongSelf = weakSelf;
1429+
if (!strongSelf) {
1430+
return;
1431+
}
1432+
[strongSelf.delegate keyHandler:strongSelf didRequestBoostScoreForPhrase:candidate.value reading:reading];
1433+
[strongSelf.delegate keyHandlerDidRequestReloadLanguageModel:strongSelf];
1434+
[strongSelf _walk];
1435+
InputStateInputting *inputting = (InputStateInputting *)[strongSelf buildInputtingState];
1436+
stateCallback(inputting);
1437+
}];
14381438
[entries addObject:boost];
14391439
title = [NSString stringWithFormat:NSLocalizedString(@"Do you want to boost the score of the phrase \"%@\"?", @""), candidate.value];
14401440
} else if (isMinusKey) {
14411441
InputStateCustomMenuEntry *exclude = [[InputStateCustomMenuEntry alloc] initWithTitle:NSLocalizedString(@"Exclude", @"")
14421442
callback:^{
1443-
__strong __typeof(weakSelf) strongSelf = weakSelf;
1444-
if (!strongSelf) {
1445-
return;
1446-
}
1447-
[strongSelf.delegate keyHandler:strongSelf didRequestExcludePhrase:candidate.value reading:reading];
1448-
[strongSelf.delegate keyHandlerDidRequestReloadLanguageModel:strongSelf];
1449-
[strongSelf _walk];
1450-
InputStateInputting *inputting = (InputStateInputting *)[strongSelf buildInputtingState];
1451-
stateCallback(inputting);
1452-
}];
1443+
__strong __typeof(weakSelf) strongSelf = weakSelf;
1444+
if (!strongSelf) {
1445+
return;
1446+
}
1447+
[strongSelf.delegate keyHandler:strongSelf didRequestExcludePhrase:candidate.value reading:reading];
1448+
[strongSelf.delegate keyHandlerDidRequestReloadLanguageModel:strongSelf];
1449+
[strongSelf _walk];
1450+
InputStateInputting *inputting = (InputStateInputting *)[strongSelf buildInputtingState];
1451+
stateCallback(inputting);
1452+
}];
14531453
[entries addObject:exclude];
14541454
title = [NSString stringWithFormat:NSLocalizedString(@"Do you want to exclude the phrase \"%@\"?", @""), candidate.value];
14551455
}
14561456
InputStateCustomMenuEntry *cancel = [[InputStateCustomMenuEntry alloc] initWithTitle:NSLocalizedString(@"Cancel", @"")
14571457
callback:^{
1458-
stateCallback(currentState);
1459-
gCurrentCandidateController.selectedCandidateIndex = index;
1460-
}];
1458+
stateCallback(currentState);
1459+
gCurrentCandidateController.selectedCandidateIndex = index;
1460+
}];
14611461
[entries addObject:cancel];
14621462

14631463
InputStateCustomMenu *confirm = [[InputStateCustomMenu alloc] initWithComposingBuffer:[currentState composingBuffer] cursorIndex:[currentState cursorIndex] title:title entries:entries previousState:currentState selectedIndex:index];
@@ -1602,16 +1602,16 @@ - (BOOL)_handleCandidateState:(InputState *)state
16021602
isPageDown = charCode == 32 || input.isPageDown || input.emacsKey == McBopomofoEmacsKeyNextPage;
16031603
isPageUp = input.isPageUp;
16041604
switch (Preferences.allowMovingCursorWhenChoosingCandidates) {
1605-
case MovingCursorKeyUseJK:
1606-
isPageDown = isPageDown || [input.inputText isEqualToString:@"l"];
1607-
isPageUp = isPageUp || [input.inputText isEqualToString:@"h"];
1608-
break;
1609-
case MovingCursorKeyUseHL:
1610-
isPageDown = isPageDown || [input.inputText isEqualToString:@"k"];
1611-
isPageUp = isPageUp || [input.inputText isEqualToString:@"j"];
1612-
break;
1613-
default:
1614-
break;
1605+
case MovingCursorKeyUseJK:
1606+
isPageDown = isPageDown || [input.inputText isEqualToString:@"l"];
1607+
isPageUp = isPageUp || [input.inputText isEqualToString:@"h"];
1608+
break;
1609+
case MovingCursorKeyUseHL:
1610+
isPageDown = isPageDown || [input.inputText isEqualToString:@"k"];
1611+
isPageUp = isPageUp || [input.inputText isEqualToString:@"j"];
1612+
break;
1613+
default:
1614+
break;
16151615
}
16161616

16171617
if (isPageDown) {

0 commit comments

Comments
 (0)