Created
October 26, 2011 08:52
-
-
Save takkanm/1315818 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Headers/iTerm/PTYTextView.h b/Headers/iTerm/PTYTextView.h | |
| index 54c192c..a75f0bc 100644 | |
| --- a/Headers/iTerm/PTYTextView.h | |
| +++ b/Headers/iTerm/PTYTextView.h | |
| @@ -100,6 +100,8 @@ typedef struct PTYFontInfo PTYFontInfo; | |
| BOOL CURSOR; | |
| BOOL colorInvertedCursor; | |
| + BOOL doCommandBySelectorCalled; | |
| + | |
| // geometry | |
| double lineHeight; | |
| double lineWidth; | |
| diff --git a/PTYTextView.m b/PTYTextView.m | |
| index 538eed9..40d787d 100644 | |
| --- a/PTYTextView.m | |
| +++ b/PTYTextView.m | |
| @@ -2188,6 +2188,9 @@ NSMutableArray* screens=0; | |
| if (!workAroundControlBug) { | |
| // Let the IME process key events | |
| IM_INPUT_INSERT = NO; | |
| + | |
| + doCommandBySelectorCalled = NO; | |
| + | |
| if (debugKeyDown) { | |
| NSLog(@"PTYTextView keyDown send to IME"); | |
| } | |
| @@ -2196,6 +2199,7 @@ NSMutableArray* screens=0; | |
| // If the IME didn't want it, pass it on to the delegate | |
| if (!prev && | |
| !IM_INPUT_INSERT && | |
| + doCommandBySelectorCalled && | |
| ![self hasMarkedText]) { | |
| if (debugKeyDown) { | |
| NSLog(@"PTYTextView keyDown IME no, send to delegate"); | |
| @@ -3848,6 +3852,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) { | |
| /// NSTextInput stuff | |
| - (void)doCommandBySelector:(SEL)aSelector | |
| { | |
| + doCommandBySelectorCalled = YES; | |
| //NSLog(@"doCommandBySelector:%@", NSStringFromSelector(aSelector)); | |
| #if GREED_KEYDOWN == 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment