Skip to content

Commit

Permalink
Typos, comments, cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Cabanero committed Feb 12, 2018
1 parent c5f3722 commit e54b7e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
24 changes: 10 additions & 14 deletions Blink/TermInput.m
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,6 @@ - (void)ctrlSeq:(UIKeyCommand *)cmd

- (void)metaSeq:(UIKeyCommand *)cmd
{
// if ([cmd.input isEqual:@"e"]) {
//_disableAccents = YES;
// }

if (_termDelegate.termView.hasSelection) {
[self _changeSelectionWithInput:cmd.input andFlags:UIKeyModifierAlternate];
} else {
Expand Down Expand Up @@ -498,7 +494,7 @@ - (void)autoRepeatSeq:(id)sender
}
}

- (BOOL)_remapCmdSeqWidthSender:(id)sender andInput:(NSString *)input
- (BOOL)_remapCmdSeqWithSender:(id)sender andInput:(NSString *)input
{
if (!_cmdModifierSequence ||
[sender isKindOfClass:[UIMenuController class]]) {
Expand All @@ -524,54 +520,54 @@ - (BOOL)_remapCmdSeqWidthSender:(id)sender andInput:(NSString *)input
// Cmd+c
- (void)copy:(id)sender
{
if (![self _remapCmdSeqWidthSender:sender andInput:@"c"]) {
if (![self _remapCmdSeqWithSender:sender andInput:@"c"]) {
[_termDelegate.termView copy:sender];
}
}
// Cmd+x
- (void)cut:(id)sender
{
[self _remapCmdSeqWidthSender:sender andInput:@"x"];
[self _remapCmdSeqWithSender:sender andInput:@"x"];
}
// Cmd+v
- (void)paste:(id)sender
{
if (![self _remapCmdSeqWidthSender:sender andInput:@"v"]) {
if (![self _remapCmdSeqWithSender:sender andInput:@"v"]) {
[self yank:sender];
}
}

// Cmd+z
- (void)undoWithManager:(UndoManager *)manager
{
[self _remapCmdSeqWidthSender:manager andInput:@"z"];
[self _remapCmdSeqWithSender:manager andInput:@"z"];
}

// Cmd+Z
- (void)redoWithManager:(UndoManager *)manager
{
[self _remapCmdSeqWidthSender:manager andInput:@"Z"];
[self _remapCmdSeqWithSender:manager andInput:@"Z"];
}

// Cmd+a
- (void)selectAll:(id)sender
{
[self _remapCmdSeqWidthSender:sender andInput:@"a"];
[self _remapCmdSeqWithSender:sender andInput:@"a"];
}
// Cmd+b
- (void)toggleBoldface:(id)sender
{
[self _remapCmdSeqWidthSender:sender andInput:@"b"];
[self _remapCmdSeqWithSender:sender andInput:@"b"];
}
// Cmd+i
- (void)toggleItalics:(id)sender
{
[self _remapCmdSeqWidthSender:sender andInput:@"i"];
[self _remapCmdSeqWithSender:sender andInput:@"i"];
}
// Cmd+u
- (void)toggleUnderline:(id)sender
{
[self _remapCmdSeqWidthSender:sender andInput:@"u"];
[self _remapCmdSeqWithSender:sender andInput:@"u"];
}

- (void)pasteSelection:(id)sender
Expand Down
2 changes: 2 additions & 0 deletions Blink/TouchOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoi

- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
{
// The NO / YES process makes it forget about previous events and avoids collisions.
_pinchGestureRecognizer.enabled = NO;
_pinchGestureRecognizer.enabled = YES;
}

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
// The NO / YES process makes it forget about previous events and avoids collisions.
_pinchGestureRecognizer.enabled = NO;
_pinchGestureRecognizer.enabled = YES;
[self _resetOtherInteractions];
Expand Down

0 comments on commit e54b7e3

Please sign in to comment.