Skip to content
Snippets Groups Projects
Commit 3c029404 authored by George Nachman's avatar George Nachman
Browse files

Adhoc build 1.0.0.20131207_164840

parent 007387a3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -873,21 +873,14 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
- (void)writeTaskImpl:(NSData *)data
{
static BOOL checkedDebug;
static BOOL debugKeyDown;
if (!checkedDebug) {
debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
checkedDebug = YES;
}
if (debugKeyDown || gDebugLogging) {
const char *bytes = [data bytes];
for (int i = 0; i < [data length]; i++) {
if (debugKeyDown) {
NSLog(@"writeTask keydown %d: %d (%c)", i, (int) bytes[i], bytes[i]);
}
if (gDebugLogging) {
DebugLog([NSString stringWithFormat:@"writeTask keydown %d: %d (%c)", i, (int) bytes[i], bytes[i]]);
}
}
const char *bytes = [data bytes];
DLog(@"writeTaskImpl: self=%@ TEXTVIEW=%@", self, TEXTVIEW);
DLog(@"writeTaskImpl call stack:\n%@", [NSThread callStackSymbols]);
for (int i = 0; i < data.length; i++) {
DLog(@"writeTask keydown %d: %d (%c)", i, (int) bytes[i], bytes[i]);
}
 
// check if we want to send this input to all the sessions
Loading
Loading
@@ -1327,7 +1320,6 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
// pass the keystroke as input.
- (void)keyDown:(NSEvent *)event
{
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
unsigned char *send_str = NULL;
unsigned char *dataPtr = NULL;
int dataLength = 0;
Loading
Loading
@@ -1354,15 +1346,13 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
unicode = [keystr length] > 0 ? [keystr characterAtIndex:0] : 0;
unmodunicode = [unmodkeystr length] > 0 ? [unmodkeystr characterAtIndex:0] : 0;
if (debugKeyDown) {
NSLog(@"PTYSession keyDown modflag=%d keystr=%@ unmodkeystr=%@ unicode=%d unmodunicode=%d", (int)modflag, keystr, unmodkeystr, (int)unicode, (int)unmodunicode);
}
DLog(@"PTYSession keyDown modflag=%d keystr=%@ unmodkeystr=%@ unicode=%d unmodunicode=%d", (int)modflag, keystr, unmodkeystr, (int)unicode, (int)unmodunicode);
DLog(@"self=%@ TEXTVIEW=%@", self, TEXTVIEW);
gettimeofday(&lastInput, NULL);
 
if ([[[self tab] realParentWindow] inInstantReplay]) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown in IR");
}
DLog(@"PTYSession keyDown in IR");
// Special key handling in IR mode, and keys never get sent to the live
// session, even though it might be displayed.
if (unicode == 27) {
Loading
Loading
@@ -1394,9 +1384,6 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
 
unsigned short keycode = [event keyCode];
if (debugKeyDown) {
NSLog(@"event:%@ (%x+%x)[%@][%@]:%x(%c) <%d>", event,modflag,keycode,keystr,unmodkeystr,unicode,unicode,(modflag & NSNumericPadKeyMask));
}
DebugLog([NSString stringWithFormat:@"event:%@ (%x+%x)[%@][%@]:%x(%c) <%d>", event,modflag,keycode,keystr,unmodkeystr,unicode,unicode,(modflag & NSNumericPadKeyMask)]);
 
// Check if we have a custom key mapping for this event
Loading
Loading
@@ -1404,12 +1391,8 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
modifiers:modflag
text:&keyBindingText
keyMappings:[[self addressBookEntry] objectForKey:KEY_KEYBOARD_MAP]];
DLog(@"keyBindingAction=%d", keyBindingAction);
if (keyBindingAction >= 0) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown action=%d", keyBindingAction);
}
DebugLog([NSString stringWithFormat:@"keyBindingAction=%d", keyBindingAction]);
// A special action was bound to this key combination.
NSString* temp;
int profileAction = [iTermKeyBindingMgr localActionForKeyCode:unmodunicode
Loading
Loading
@@ -1594,14 +1577,12 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
break;
}
} else {
DLog(@"Key not bound to an action");
// Key is not bound to an action.
if (!EXIT && tmuxMode_ == TMUX_GATEWAY) {
[self handleKeypressInTmuxGateway:unicode];
return;
}
if (debugKeyDown) {
NSLog(@"PTYSession keyDown no keybinding action");
}
DebugLog(@"No keybinding action");
if (EXIT) {
DebugLog(@"Terminal already dead");
Loading
Loading
@@ -1609,13 +1590,10 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
// No special binding for this key combination.
if (modflag & NSFunctionKeyMask) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown is a function key");
}
DebugLog(@"Is a function key");
// Handle all "special" keys (arrows, etc.)
NSData *data = nil;
DLog(@"Checking for funciton keys based on unicode variable=%d", (int)unicode);
switch (unicode) {
case NSUpArrowFunctionKey:
data = [TERMINAL keyArrowUp:modflag];
Loading
Loading
@@ -1658,9 +1636,11 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
 
if (data != nil) {
DLog(@"Got some function key data");
send_str = (unsigned char *)[data bytes];
send_strlen = [data length];
} else if (keystr != nil) {
DLog(@"Using keystr");
NSData *keydat = ((modflag & NSControlKeyMask) && unicode > 0) ?
[keystr dataUsingEncoding:NSUTF8StringEncoding] :
[unmodkeystr dataUsingEncoding:NSUTF8StringEncoding];
Loading
Loading
@@ -1673,9 +1653,6 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
([self optionKey] != OPT_NORMAL)) || /// synergy
((modflag & NSRightAlternateKeyMask) == NSRightAlternateKeyMask &&
([self rightOptionKey] != OPT_NORMAL))) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown opt + key -> modkey");
}
DebugLog(@"Option + key -> modified key");
// A key was pressed while holding down option and the option key
// is not behaving normally. Apply the modified behavior.
Loading
Loading
@@ -1692,6 +1669,7 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
[unmodkeystr dataUsingEncoding:NSUTF8StringEncoding];
if (keydat != nil) {
send_str = (unsigned char *)[keydat bytes];
DLog(@"keydat is set to %@", keydat);
send_strlen = [keydat length];
}
if (mode == OPT_ESC) {
Loading
Loading
@@ -1703,24 +1681,15 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
}
} else {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown regular path");
}
DebugLog(@"Regular path for keypress");
// Regular path for inserting a character from a keypress.
int max = [keystr length];
NSData *data=nil;
 
if (max != 1||[keystr characterAtIndex:0] > 0x7f) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown non-ascii");
}
DebugLog(@"Non-ascii input");
data = [keystr dataUsingEncoding:[TERMINAL encoding]];
} else {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown ascii");
}
DebugLog(@"ASCII input");
data = [keystr dataUsingEncoding:NSUTF8StringEncoding];
}
Loading
Loading
@@ -1728,17 +1697,11 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
// Enter key is on numeric keypad, but not marked as such
if (unicode == NSEnterCharacter && unmodunicode == NSEnterCharacter) {
modflag |= NSNumericPadKeyMask;
if (debugKeyDown) {
NSLog(@"PTYSession keyDown enter key");
}
DebugLog(@"Enter key");
keystr = @"\015"; // Enter key -> 0x0d
}
// Check if we are in keypad mode
if (modflag & NSNumericPadKeyMask) {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown numeric keyoad");
}
DebugLog(@"Numeric keypad mask");
data = [TERMINAL keypadData:unicode keystr:keystr];
}
Loading
Loading
@@ -1753,9 +1716,7 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
// Do not send anything for cmd+[shift]+enter if it wasn't
// caught by the menu.
DebugLog(@"Cmd + 0-9 or cmd + enter");
if (debugKeyDown) {
NSLog(@"PTYSession keyDown cmd+0-9 or cmd+enter");
}
data = nil;
}
if (data != nil) {
Loading
Loading
@@ -1763,18 +1724,13 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
send_strlen = [data length];
DebugLog([NSString stringWithFormat:@"modflag = 0x%x; send_strlen = %zd; send_str[0] = '%c (0x%x)'",
modflag, send_strlen, send_str[0], send_str[0]]);
if (debugKeyDown) {
DebugLog([NSString stringWithFormat:@"modflag = 0x%x; send_strlen = %zd; send_str[0] = '%c (0x%x)'",
modflag, send_strlen, send_str[0], send_str[0]]);
}
}
 
if ((modflag & NSControlKeyMask) &&
send_strlen == 1 &&
send_str[0] == '|') {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown c-|");
}
DLog(@"PTYSession keyDown c-|");
// Control-| is sent as Control-backslash
send_str = (unsigned char*)"\034";
send_strlen = 1;
Loading
Loading
@@ -1782,27 +1738,24 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
(modflag & NSShiftKeyMask) &&
send_strlen == 1 &&
send_str[0] == '/') {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown c-?");
}
DLog(@"PTYSession keyDown c-?");
// Control-shift-/ is sent as Control-?
send_str = (unsigned char*)"\177";
send_strlen = 1;
} else if ((modflag & NSControlKeyMask) &&
send_strlen == 1 &&
send_str[0] == '/') {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown c-/");
}
DLog(@"PTYSession keyDown c-/");
// Control-/ is sent as Control-/, but needs some help to do so.
send_str = (unsigned char*)"\037"; // control-/
send_strlen = 1;
} else if ((modflag & NSShiftKeyMask) &&
send_strlen == 1 &&
send_str[0] == '\031') {
if (debugKeyDown) {
NSLog(@"PTYSession keyDown shift-tab -> esc[Z");
}
DLog(@"PTYSession keyDown shift-tab -> esc[Z");
// Shift-tab is sent as Esc-[Z (or "backtab")
send_str = (unsigned char*)"\033[Z";
send_strlen = 3;
Loading
Loading
Loading
Loading
@@ -1403,10 +1403,10 @@ NSMutableArray* screens=0;
 
- (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
{
// NSLog(@"accessibilityAttributeValue:%@ forParameter:%@", attribute, parameter);
// DLog(@"accessibilityAttributeValue:%@ forParameter:%@", attribute, parameter);
id result = [self _accessibilityAttributeValue:attribute forParameter:parameter];
// NSLog(@" returns %@", result);
// NSLog(@"%@(%@) = %@", attribute, parameter, result);
// DLog(@" returns %@", result);
// DLog(@"%@(%@) = %@", attribute, parameter, result);
return result;
}
 
Loading
Loading
@@ -1510,10 +1510,10 @@ NSMutableArray* screens=0;
}
 
- (id)accessibilityAttributeValue:(NSString *)attribute {
// NSLog(@"accessibilityAttributeValue:%@", attribute);
// DLog(@"accessibilityAttributeValue:%@", attribute);
id result = [self _accessibilityAttributeValue:attribute];
// NSLog(@" returns %@", result);
// NSLog(@"%@ = %@", attribute, result);
// DLog(@" returns %@", result);
// DLog(@"%@ = %@", attribute, result);
return result;
}
 
Loading
Loading
@@ -1922,7 +1922,7 @@ NSMutableArray* screens=0;
static BOOL prevBad=NO;
++iteration;
if (prevBad) {
NSLog(@"Last was bad.");
DLog(@"Last was bad.");
prevBad = NO;
}
DebugLog([NSString stringWithFormat:@"%s(0x%x): rect=(%f,%f,%f,%f) frameRect=(%f,%f,%f,%f)]",
Loading
Loading
@@ -2250,14 +2250,14 @@ NSMutableArray* screens=0;
 
BOOL debug = [SmartSelectionController logDebugInfo];
if (debug) {
NSLog(@"Perform smart selection on text: %@", textWindow);
DLog(@"Perform smart selection on text: %@", textWindow);
}
for (int j = 0; j < numRules; j++) {
NSDictionary *rule = [rulesArray objectAtIndex:j];
NSString *regex = [SmartSelectionController regexInRule:rule];
double precision = [SmartSelectionController precisionInRule:rule];
if (debug) {
NSLog(@"Try regex %@", regex);
DLog(@"Try regex %@", regex);
}
for (int i = 0; i <= targetOffset; i++) {
NSString* substring = [textWindow substringWithRange:NSMakeRange(i, [textWindow length] - i)];
Loading
Loading
@@ -2284,7 +2284,7 @@ NSMutableArray* screens=0;
[matches setObject:match forKey:result];
 
if (debug) {
NSLog(@"Add result %@ at %d,%lld -> %d,%lld with score %lf", result, match->startX, match->absStartY, match->endX, match->absEndY, match->score);
DLog(@"Add result %@ at %d,%lld -> %d,%lld with score %lf", result, match->startX, match->absStartY, match->endX, match->absEndY, match->score);
}
}
i += temp.location + temp.length - 1;
Loading
Loading
@@ -2301,7 +2301,7 @@ NSMutableArray* screens=0;
NSArray* sortedMatches = [[matches allValues] sortedArrayUsingSelector:@selector(compare:)];
SmartMatch* bestMatch = [sortedMatches lastObject];
if (debug) {
NSLog(@"Select match with score %lf", bestMatch->score);
DLog(@"Select match with score %lf", bestMatch->score);
}
*X1 = bestMatch->startX;
*Y1 = bestMatch->absStartY - [dataSource totalScrollbackOverflow];
Loading
Loading
@@ -2310,7 +2310,7 @@ NSMutableArray* screens=0;
return YES;
} else {
if (debug) {
NSLog(@"No matches. Fall back on word selection.");
DLog(@"No matches. Fall back on word selection.");
}
// Fall back on word selection
[self getWordForX:x
Loading
Loading
@@ -2376,10 +2376,10 @@ NSMutableArray* screens=0;
isFirstInteraction = NO;
}
 
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
BOOL debugKeyDown = YES;
 
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown BEGIN %@", event);
DLog(@"PTYTextView keyDown BEGIN %@", event);
}
DebugLog(@"PTYTextView keyDown");
id delegate = [self delegate];
Loading
Loading
@@ -2389,7 +2389,7 @@ NSMutableArray* screens=0;
}
if ([[[[[self dataSource] session] tab] realParentWindow] inInstantReplay]) {
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown: in instant replay, send to delegate");
DLog(@"PTYTextView keyDown: in instant replay, send to delegate");
}
// Delegate has special handling for this case.
[delegate keyDown:event];
Loading
Loading
@@ -2400,19 +2400,18 @@ NSMutableArray* screens=0;
BOOL prev = [self hasMarkedText];
 
keyIsARepeat = [event isARepeat];
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown modflag=%d keycode=%d", modflag, (int)keyCode);
NSLog(@"prev=%d", (int)prev);
NSLog(@"hasActionableKeyMappingForEvent=%d", (int)[delegate hasActionableKeyMappingForEvent:event]);
NSLog(@"modFlag & (NSNumericPadKeyMask | NSFUnctionKeyMask)=%d", (modflag & (NSNumericPadKeyMask | NSFunctionKeyMask)));
NSLog(@"charactersIgnoringModififiers length=%d", (int)[[event charactersIgnoringModifiers] length]);
NSLog(@"delegate optionkey=%d, delegate rightOptionKey=%d", (int)[delegate optionKey], (int)[delegate rightOptionKey]);
NSLog(@"modflag & leftAlt == leftAlt && optionKey != NORMAL = %d", (int)((modflag & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask && [delegate optionKey] != OPT_NORMAL));
NSLog(@"modflag == alt && optionKey != NORMAL = %d", (int)(modflag == NSAlternateKeyMask && [delegate optionKey] != OPT_NORMAL));
NSLog(@"modflag & rightAlt == rightAlt && rightOptionKey != NORMAL = %d", (int)((modflag & NSRightAlternateKeyMask) == NSRightAlternateKeyMask && [delegate rightOptionKey] != OPT_NORMAL));
NSLog(@"isControl=%d", (int)(modflag & NSControlKeyMask));
NSLog(@"keycode is slash=%d, is backslash=%d", (keyCode == 0x2c), (keyCode == 0x2a));
}
DLog(@"PTYTextView keyDown modflag=%d keycode=%d", modflag, (int)keyCode);
DLog(@"self=%@ delegate=%@", self, delegate);
DLog(@"prev=%d", (int)prev);
DLog(@"hasActionableKeyMappingForEvent=%d", (int)[delegate hasActionableKeyMappingForEvent:event]);
DLog(@"modFlag & (NSNumericPadKeyMask | NSFUnctionKeyMask)=%d", (modflag & (NSNumericPadKeyMask | NSFunctionKeyMask)));
DLog(@"charactersIgnoringModififiers length=%d", (int)[[event charactersIgnoringModifiers] length]);
DLog(@"delegate optionkey=%d, delegate rightOptionKey=%d", (int)[delegate optionKey], (int)[delegate rightOptionKey]);
DLog(@"modflag & leftAlt == leftAlt && optionKey != NORMAL = %d", (int)((modflag & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask && [delegate optionKey] != OPT_NORMAL));
DLog(@"modflag == alt && optionKey != NORMAL = %d", (int)(modflag == NSAlternateKeyMask && [delegate optionKey] != OPT_NORMAL));
DLog(@"modflag & rightAlt == rightAlt && rightOptionKey != NORMAL = %d", (int)((modflag & NSRightAlternateKeyMask) == NSRightAlternateKeyMask && [delegate rightOptionKey] != OPT_NORMAL));
DLog(@"isControl=%d", (int)(modflag & NSControlKeyMask));
DLog(@"keycode is slash=%d, is backslash=%d", (keyCode == 0x2c), (keyCode == 0x2a));
 
// Hide the cursor
[NSCursor setHiddenUntilMouseMoves:YES];
Loading
Loading
@@ -2428,20 +2427,20 @@ NSMutableArray* screens=0;
((modflag & NSControlKeyMask) && // a few special cases
(keyCode == 0x2c /* slash */ || keyCode == 0x2a /* backslash */)))) {
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown: process in delegate");
DLog(@"PTYTextView keyDown: process in delegate");
}
[delegate keyDown:event];
return;
}
 
if (debugKeyDown) {
NSLog(@"Test for command key");
DLog(@"Test for command key");
}
if (modflag & NSCommandKeyMask) {
// You pressed cmd+something but it's not handled by the delegate. Going further would
// send the unmodified key to the terminal which doesn't make sense.
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown You pressed cmd+something");
DLog(@"PTYTextView keyDown You pressed cmd+something");
}
return;
}
Loading
Loading
@@ -2452,7 +2451,7 @@ NSMutableArray* screens=0;
if (!prev &&
(modflag & (NSControlKeyMask | NSCommandKeyMask | NSAlternateKeyMask)) == NSControlKeyMask) {
if (debugKeyDown) {
NSLog(@"Special ctrl+key handler running");
DLog(@"Special ctrl+key handler running");
}
NSString *unmodkeystr = [event charactersIgnoringModifiers];
if ([unmodkeystr length] != 0) {
Loading
Loading
@@ -2476,7 +2475,7 @@ NSMutableArray* screens=0;
if (cc != 0xffff) {
[self insertText:[NSString stringWithCharacters:&cc length:1]];
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown work around control bug. cc=%d", (int)cc);
DLog(@"PTYTextView keyDown work around control bug. cc=%d", (int)cc);
}
workAroundControlBug = YES;
}
Loading
Loading
@@ -2487,7 +2486,7 @@ NSMutableArray* screens=0;
// Let the IME process key events
IM_INPUT_INSERT = NO;
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown send to IME");
DLog(@"PTYTextView keyDown send to IME");
}
// In issue 2743, it is revealed that in OS 10.9 this sometimes calls -insertText on the
Loading
Loading
@@ -2503,13 +2502,13 @@ NSMutableArray* screens=0;
!IM_INPUT_INSERT &&
![self hasMarkedText]) {
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown IME no, send to delegate");
DLog(@"PTYTextView keyDown IME no, send to delegate");
}
[delegate keyDown:event];
}
}
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown END");
DLog(@"PTYTextView keyDown END");
}
}
 
Loading
Loading
@@ -3957,10 +3956,10 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
 
- (void)placeCursorOnCurrentLineWithEvent:(NSEvent *)event
{
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
BOOL debugKeyDown = YES;
 
if (debugKeyDown) {
NSLog(@"PTYTextView placeCursorOnCurrentLineWithEvent BEGIN %@", event);
DLog(@"PTYTextView placeCursorOnCurrentLineWithEvent BEGIN %@", event);
}
DebugLog(@"PTYTextView placeCursorOnCurrentLineWithEvent");
 
Loading
Loading
@@ -4003,12 +4002,12 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
}
}
if (debugKeyDown) {
NSLog(@"cursor at %d,%d (x,y) moved to %d,%d (x,y) [window width: %d]",
DLog(@"cursor at %d,%d (x,y) moved to %d,%d (x,y) [window width: %d]",
cursorX, cursorY, x, y, width);
}
 
if (debugKeyDown) {
NSLog(@"PTYTextView placeCursorOnCurrentLineWithEvent END");
DLog(@"PTYTextView placeCursorOnCurrentLineWithEvent END");
}
}
 
Loading
Loading
@@ -4358,7 +4357,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
range:NSMakeRange(0, [substring length])
error:&regexError];
if (components.count) {
NSLog(@"Components for %@ are %@", regex, components);
DLog(@"Components for %@ are %@", regex, components);
NSArray *actions = [SmartSelectionController actionsInRule:rule];
for (NSDictionary *action in actions) {
SEL mySelector;
Loading
Loading
@@ -4400,7 +4399,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
 
- (void)contextMenuActionOpenFile:(id)sender
{
NSLog(@"Open file: '%@'", [sender representedObject]);
DLog(@"Open file: '%@'", [sender representedObject]);
[[NSWorkspace sharedWorkspace] openFile:[[sender representedObject] stringByExpandingTildeInPath]];
}
 
Loading
Loading
@@ -4408,17 +4407,17 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
{
NSURL *url = [NSURL URLWithString:[sender representedObject]];
if (url) {
NSLog(@"Open URL: %@", [sender representedObject]);
DLog(@"Open URL: %@", [sender representedObject]);
[[NSWorkspace sharedWorkspace] openURL:url];
} else {
NSLog(@"%@ is not a URL", [sender representedObject]);
DLog(@"%@ is not a URL", [sender representedObject]);
}
}
 
- (void)contextMenuActionRunCommand:(id)sender
{
NSString *command = [sender representedObject];
NSLog(@"Run command: %@", command);
DLog(@"Run command: %@", command);
[NSThread detachNewThreadSelector:@selector(runCommand:)
toTarget:[self class]
withObject:command];
Loading
Loading
@@ -4435,7 +4434,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
- (void)contextMenuActionRunCoprocess:(id)sender
{
NSString *command = [sender representedObject];
NSLog(@"Run coprocess: %@", command);
DLog(@"Run coprocess: %@", command);
[_delegate launchCoprocessWithCommand:command];
}
 
Loading
Loading
@@ -4884,9 +4883,9 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
}
DLog(@"PTYTextView insertText:%@", aString);
if ([self hasMarkedText]) {
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
BOOL debugKeyDown = YES;
if (debugKeyDown) {
NSLog(@"insertText: clear marked text");
DLog(@"insertText: clear marked text");
}
IM_INPUT_MARKEDRANGE = NSMakeRange(0, 0);
[markedText release];
Loading
Loading
@@ -4920,9 +4919,9 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
 
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
{
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
BOOL debugKeyDown = YES;
if (debugKeyDown) {
NSLog(@"set marked text to %@; range %@", aString, [NSValue valueWithRange:selRange]);
DLog(@"set marked text to %@; range %@", aString, [NSValue valueWithRange:selRange]);
}
[markedText release];
if ([aString isKindOfClass:[NSAttributedString class]]) {
Loading
Loading
@@ -4961,9 +4960,9 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
 
- (void)unmarkText
{
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
BOOL debugKeyDown = YES;
if (debugKeyDown) {
NSLog(@"clear marked text");
DLog(@"clear marked text");
}
// As far as I can tell this is never called.
IM_INPUT_MARKEDRANGE = NSMakeRange(0, 0);
Loading
Loading
@@ -6316,7 +6315,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
if (!thisCharString) {
// A bug that's happened more than once is that code gets
// set to 0 but complexChar is left set to true.
NSLog(@"No complex char for code %d", (int)theLine[i].code);
DLog(@"No complex char for code %d", (int)theLine[i].code);
thisCharString = @"";
drawable = NO;
} else {
Loading
Loading
Loading
Loading
@@ -266,7 +266,7 @@ NSString *sessionsKey = @"sessions";
DLog(@"Convert default screen to screen number: No screen matches the window's screen so using main screen");
screenNumber = 0;
} else {
DLog(@"Convert default screen to screen number: System chose screen %d", n);
DLog(@"Convert default screen to screen number: System chose screen %lu", (unsigned long)n);
screenNumber = n;
}
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment