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

Fix merge conflicts

parents b8c28a8d d0ae459a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -28,6 +28,7 @@
 
#define NSSTRINGJTERMINAL_CLASS_COMPILE
#import "NSStringITerm.h"
#import <wchar.h>
 
#define AMB_CHAR_NUMBER (sizeof(ambiguous_chars) / sizeof(int))
 
Loading
Loading
Loading
Loading
@@ -335,6 +335,7 @@ typedef enum {
 
// Preferences
- (void)setPreferencesFromAddressBookEntry: (NSDictionary *)aePrefs;
- (void)loadInitialColorTable;
 
// PTYTask
- (void)writeTask:(NSData*)data;
Loading
Loading
Loading
Loading
@@ -345,6 +345,7 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
[aSession setSizeFromArrangement:arrangement];
}
[aSession setPreferencesFromAddressBookEntry:theBookmark];
[aSession loadInitialColorTable];
[[aSession SCREEN] setDisplay:[aSession TEXTVIEW]];
[aSession setName:[theBookmark objectForKey:KEY_NAME]];
[aSession setBookmarkName:[theBookmark objectForKey:KEY_NAME]];
Loading
Loading
@@ -2276,6 +2277,21 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
return ([[NSString alloc] initWithFormat:@"%d;%d", fgNum, bgNum]);
}
 
- (void)loadInitialColorTable
{
int i;
for (i = 0; i < 216; i++) {
[self setColorTable:i+16
color:[NSColor colorWithCalibratedRed:(i/36) ? ((i/36)*40+55)/255.0 : 0
green:(i%36)/6 ? (((i%36)/6)*40+55)/255.0:0
blue:(i%6) ?((i%6)*40+55)/255.0:0
alpha:1]];
}
for (i = 0; i < 24; i++) {
[self setColorTable:i+232 color:[NSColor colorWithCalibratedWhite:(i*10+8)/255.0 alpha:1]];
}
}
- (void)setPreferencesFromAddressBookEntry:(NSDictionary *)aePrefs
{
NSColor *colorTable[2][8];
Loading
Loading
@@ -2321,16 +2337,6 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
[self setColorTable:i color:colorTable[0][i]];
[self setColorTable:i+8 color:colorTable[1][i]];
}
for (i = 0; i < 216; i++) {
[self setColorTable:i+16
color:[NSColor colorWithCalibratedRed:(i/36) ? ((i/36)*40+55)/255.0 : 0
green:(i%36)/6 ? (((i%36)/6)*40+55)/255.0:0
blue:(i%6) ?((i%6)*40+55)/255.0:0
alpha:1]];
}
for (i = 0; i < 24; i++) {
[self setColorTable:i+232 color:[NSColor colorWithCalibratedWhite:(i*10+8)/255.0 alpha:1]];
}
 
// background image
[self setBackgroundImagePath:[aDict objectForKey:KEY_BACKGROUND_IMAGE_LOCATION]];
Loading
Loading
Loading
Loading
@@ -91,6 +91,8 @@ static double gSmartCursorBgThreshold = 0.5;
// B/W text mode is triggered. 0 means always trigger, 1 means never trigger.
static double gSmartCursorFgThreshold = 0.75;
 
static PTYTextView *gCurrentKeyEventTextView; // See comment in -keyDown:
@implementation FindCursorView
 
@synthesize cursor;
Loading
Loading
@@ -2487,7 +2489,14 @@ NSMutableArray* screens=0;
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown send to IME");
}
// In issue 2743, it is revealed that in OS 10.9 this sometimes calls -insertText on the
// wrong instnace of PTYTextView. We work around the issue by using a global variable to
// track the instance of PTYTextView that is currently handling a key event and rerouting
// calls as needed in -insertText and -doCommandBySelector.
gCurrentKeyEventTextView = [[self retain] autorelease];
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
gCurrentKeyEventTextView = nil;
 
// If the IME didn't want it, pass it on to the delegate
if (!prev &&
Loading
Loading
@@ -4848,7 +4857,13 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
/// NSTextInput stuff
- (void)doCommandBySelector:(SEL)aSelector
{
//NSLog(@"doCommandBySelector:%@", NSStringFromSelector(aSelector));
if (gCurrentKeyEventTextView && self != gCurrentKeyEventTextView) {
// See comment in -keyDown:
DLog(@"Rerouting doCommandBySelector from %@ to %@", self, gCurrentKeyEventTextView);
[gCurrentKeyEventTextView doCommandBySelector:aSelector];
return;
}
DLog(@"doCommandBySelector:%@", NSStringFromSelector(aSelector));
 
#if GREED_KEYDOWN == 0
id delegate = [self delegate];
Loading
Loading
@@ -4861,6 +4876,13 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
 
- (void)insertText:(id)aString
{
if (gCurrentKeyEventTextView && self != gCurrentKeyEventTextView) {
// See comment in -keyDown:
DLog(@"Rerouting insertText from %@ to %@", self, gCurrentKeyEventTextView);
[gCurrentKeyEventTextView insertText:aString];
return;
}
DLog(@"PTYTextView insertText:%@", aString);
if ([self hasMarkedText]) {
BOOL debugKeyDown = [[[NSUserDefaults standardUserDefaults] objectForKey:@"DebugKeyDown"] boolValue];
if (debugKeyDown) {
Loading
Loading
@@ -6463,12 +6485,17 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
CGContextRef cgContext = (CGContextRef) [ctx graphicsPort];
CGContextSetFillColorWithColor(cgContext, [self cgColorForColor:color]);
CGContextSetStrokeColorWithColor(cgContext, [self cgColorForColor:color]);
CGAffineTransform t = CGContextGetTextMatrix(cgContext);
t.a = 1;
t.b = t.c = 0;
t.d = -1;
CGContextSetTextMatrix(cgContext, t);
CGContextSetTextPosition(cgContext, pos.x, pos.y + fontInfo.baselineOffset + lineHeight);
// Many Bothans died to bring us this information: the text matrix is not initialized when
// you get a CGGraphicsContext. We flip it to make up for the view being flipped and then
// transform to place the text in the right spot. The translation is in lieu of making a
// call to CGContextSetTextPosition.
CGAffineTransform flipTransform = CGAffineTransformMakeScale(1, -1);
CGAffineTransform translateTransform =
CGAffineTransformMakeTranslation(pos.x, pos.y + fontInfo.baselineOffset + lineHeight);
CGAffineTransform textMatrix = CGAffineTransformConcat(flipTransform, translateTransform);
CGContextSetTextMatrix(cgContext, textMatrix);
for (CFIndex j = 0; j < CFArrayGetCount(runs); j++) {
CTRunRef run = CFArrayGetValueAtIndex(runs, j);
CFRange range;
Loading
Loading
Loading
Loading
@@ -1132,10 +1132,14 @@ NSString *sessionsKey = @"sessions";
}
 
if ([[PreferencePanel sharedInstance] windowNumber]) {
[[self window] setTitle:[NSString stringWithFormat:@"%d. %@", number_+1, title]];
} else {
[[self window] setTitle:title];
title = [NSString stringWithFormat:@"%d. %@", number_+1, title];
}
// In bug 2593, we see a crazy thing where setting the window title right
// after a window is created causes it to have the wrong background color.
// A delay of 0 doesn't fix it. I'm at wit's end here, so this will have to
// do until a better explanation comes along.
[[self window] performSelector:@selector(setTitle:) withObject:title afterDelay:0.1];
}
 
- (BOOL)tempTitle
Loading
Loading
@@ -5106,6 +5110,7 @@ NSString *sessionsKey = @"sessions";
[self safelySetSessionSize:aSession rows:rows columns:columns];
PtyLog(@"setupSession - call setPreferencesFromAddressBookEntry");
[aSession setPreferencesFromAddressBookEntry:tempPrefs];
[aSession loadInitialColorTable];
[aSession setBookmarkName:[tempPrefs objectForKey:KEY_NAME]];
[[aSession SCREEN] setDisplay:[aSession TEXTVIEW]];
[[aSession TERMINAL] setTrace:YES]; // debug vt100 escape sequence decode
Loading
Loading
Loading
Loading
@@ -1741,7 +1741,7 @@ static BOOL XYIsBeforeXY(int px1, int py1, int px2, int py2) {
[self setCursorX:0 Y:0];
SAVE_CURSOR_Y = 0;
ALT_SAVE_CURSOR_Y = 0;
[SESSION loadInitialColorTable];
for (int i = 0; i < 4; i++) {
saveCharset[i] = charset[i] = 0;
}
Loading
Loading
@@ -4875,8 +4875,6 @@ void DumpBuf(screen_char_t* p, int n) {
dropped = 0;
}
 
assert(dropped == 0 || dropped == 1);
return dropped;
}
 
Loading
Loading
Loading
Loading
@@ -192,8 +192,8 @@
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
<key>SUFeedURLForTesting</key>
<string>http://iterm2.com/appcasts/legacy_testing.xml</string>
<string>http://iterm2.com/appcasts/testing.xml</string>
<key>SUFeedURLForFinal</key>
<string>http://iterm2.com/appcasts/legacy_final.xml</string>
<string>http://iterm2.com/appcasts/final.xml</string>
</dict>
</plist>
Loading
Loading
@@ -1555,7 +1555,7 @@ static void RollOutHotkeyTerm(PseudoTerminal* term, BOOL itermWasActiveWhenHotke
break;
 
case WINDOW_TYPE_BOTTOM:
rect.origin.y = screenFrame.origin.y-rect.size.height;
rect.origin.y = screenFrame.origin.y - rect.size.height;
[[NSAnimationContext currentContext] setDuration:[[PreferencePanel sharedInstance] hotkeyTermAnimationDuration]];
[[[term window] animator] setFrame:rect display:YES];
[[[term window] animator] setAlphaValue:0];
Loading
Loading
]4;105;rgb:ff/00/00
Red text at index 105
]4;106;rgb:ff/ff/00
Yellow text at index 106
text at index 105 (bluish by default)
text at index 106 (greenish by default)
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