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

Merge branch 'master' of https://github.com/gnachman/iTerm2

parents 526843f1 ca1578b6
No related branches found
No related tags found
No related merge requests found
Showing
with 4434 additions and 855 deletions
This diff is collapsed.
Loading
Loading
@@ -170,6 +170,7 @@
#define WINDOW_TYPE_FORCE_FULL_SCREEN 3 // Used internally, never reported by windowType API. Causes initWithSmartLayout to create a window with fullscreen chrome. It will set its windowType to FULL_SCREEN
#define WINDOW_TYPE_LION_FULL_SCREEN 4 // Lion-native fullscreen
#define WINDOW_TYPE_BOTTOM 5
#define WINDOW_TYPE_LEFT 6
 
typedef enum {
iTermWindowObject,
Loading
Loading
Loading
Loading
@@ -316,7 +316,13 @@
#else
NSString *contents = [NSString stringWithFormat:@"%d", [cell count]];
#endif
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
if ([cell count] < 9) {
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
} else if ([cell isLast]) {
contents = [NSString stringWithFormat:@"%@9", [cell modifierString]];
} else {
contents = @"";
}
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
NSRange range = NSMakeRange(0, [contents length]);
 
Loading
Loading
Loading
Loading
@@ -332,7 +332,13 @@ static CGImageRef CGImageCreateWithNSImage(NSImage *image, CGRect sourceRect) {
#else
NSString *contents = [NSString stringWithFormat:@"%d", [cell count]];
#endif
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
if ([cell count] < 9) {
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
} else if ([cell isLast]) {
contents = [NSString stringWithFormat:@"%@9", [cell modifierString]];
} else {
contents = @"";
}
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
NSRange range = NSMakeRange(0, [contents length]);
 
Loading
Loading
Loading
Loading
@@ -281,7 +281,13 @@
#else
NSString *contents = [NSString stringWithFormat:@"%d", [cell count]];
#endif
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
if ([cell count] < 9) {
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
} else if ([cell isLast]) {
contents = [NSString stringWithFormat:@"%@9", [cell modifierString]];
} else {
contents = @"";
}
return [[[NSMutableAttributedString alloc] initWithString:contents attributes:_objectCountStringAttributes] autorelease];
}
 
Loading
Loading
Loading
Loading
@@ -36,8 +36,13 @@
NSColor *_labelColor;
NSColor *_tabColor;
NSString *_modifierString;
BOOL _isLast;
}
 
// Is this the last cell? Only valid while drawing.
@property (nonatomic, assign) BOOL isLast;
// creation/destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView;
- (id)initPlaceholderWithFrame:(NSRect)frame expanded:(BOOL)value inControlView:(PSMTabBarControl *)controlView;
Loading
Loading
Loading
Loading
@@ -19,6 +19,8 @@
 
@implementation PSMTabBarCell
 
@synthesize isLast = _isLast;
#pragma mark -
#pragma mark Creation/Destruction
- (id)initWithControlView:(PSMTabBarControl *)controlView
Loading
Loading
Loading
Loading
@@ -839,6 +839,10 @@
 
- (void)drawRect:(NSRect)rect
{
for (PSMTabBarCell *cell in [self cells]) {
[cell setIsLast:NO];
}
[[[self cells] lastObject] setIsLast:YES];
[style drawTabBar:self inRect:rect];
}
 
Loading
Loading
Loading
Loading
@@ -263,7 +263,13 @@
#else
NSString *contents = [NSString stringWithFormat:@"%d", [cell count]];
#endif
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
if ([cell count] < 9) {
contents = [NSString stringWithFormat:@"%@%@", [cell modifierString], contents];
} else if ([cell isLast]) {
contents = [NSString stringWithFormat:@"%@9", [cell modifierString]];
} else {
contents = @"";
}
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
NSRange range = NSMakeRange(0, [contents length]);
 
Loading
Loading
Loading
Loading
@@ -243,6 +243,7 @@ typedef enum {
TmuxController *tmuxController_;
int tmuxPane_;
BOOL tmuxLogging_; // log to gateway client
BOOL tmuxSecureLogging_;
}
 
// Return the current pasteboard value as a string.
Loading
Loading
Loading
Loading
@@ -130,6 +130,7 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
 
slowPasteBuffer = [[NSMutableString alloc] init];
creationDate_ = [[NSDate date] retain];
tmuxSecureLogging_ = NO;
 
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowResized)
Loading
Loading
@@ -1291,23 +1292,11 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
return;
}
if ([text length] > 0) {
NSMutableString *temp = [NSMutableString stringWithString:text];
[temp replaceOccurrencesOfString:@"\\n"
withString:@"\n"
options:NSLiteralSearch
range:NSMakeRange(0, [temp length])];
[temp replaceOccurrencesOfString:@"\\e"
withString:@"\e"
options:NSLiteralSearch
range:NSMakeRange(0, [temp length])];
[temp replaceOccurrencesOfString:@"\\a"
withString:@"\a"
options:NSLiteralSearch
range:NSMakeRange(0, [temp length])];
[temp replaceOccurrencesOfString:@"\\t"
withString:@"\t"
options:NSLiteralSearch
range:NSMakeRange(0, [temp length])];
NSString *temp = text;
temp = [temp stringByReplacingEscapedChar:'n' withString:@"\n"];
temp = [temp stringByReplacingEscapedChar:'e' withString:@"\e"];
temp = [temp stringByReplacingEscapedChar:'a' withString:@"\a"];
temp = [temp stringByReplacingEscapedChar:'t' withString:@"\t"];
[self writeTask:[temp dataUsingEncoding:NSUTF8StringEncoding]];
}
}
Loading
Loading
@@ -1382,11 +1371,6 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
return;
}
 
if (!EXIT && tmuxMode_ == TMUX_GATEWAY) {
[self handleKeypressInTmuxGateway:unicode];
return;
}
unsigned short keycode = [event keyCode];
if (debugKeyDown) {
NSLog(@"event:%@ (%x+%x)[%@][%@]:%x(%c) <%d>", event,modflag,keycode,keystr,unmodkeystr,unicode,unicode,(modflag & NSNumericPadKeyMask));
Loading
Loading
@@ -1445,6 +1429,8 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
}
}
 
BOOL isTmuxGateway = (!EXIT && tmuxMode_ == TMUX_GATEWAY);
switch (keyBindingAction) {
case KEY_ACTION_MOVE_TAB_LEFT:
[[[self tab] realParentWindow] moveTabLeft:nil];
Loading
Loading
@@ -1498,25 +1484,25 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
[(PTYScrollView *)[TEXTVIEW enclosingScrollView] detectUserScroll];
break;
case KEY_ACTION_ESCAPE_SEQUENCE:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self sendEscapeSequence:keyBindingText];
break;
case KEY_ACTION_HEX_CODE:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self sendHexCode:keyBindingText];
break;
case KEY_ACTION_TEXT:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self sendText:keyBindingText];
break;
case KEY_ACTION_RUN_COPROCESS:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self launchCoprocessWithCommand:keyBindingText];
Loading
Loading
@@ -1526,13 +1512,13 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
break;
 
case KEY_ACTION_SEND_C_H_BACKSPACE:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self writeTask:[@"\010" dataUsingEncoding:NSUTF8StringEncoding]];
break;
case KEY_ACTION_SEND_C_QM_BACKSPACE:
if (EXIT) {
if (EXIT || isTmuxGateway) {
return;
}
[self writeTask:[@"\177" dataUsingEncoding:NSUTF8StringEncoding]]; // decimal 127
Loading
Loading
@@ -1540,9 +1526,15 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
case KEY_ACTION_IGNORE:
break;
case KEY_ACTION_IR_FORWARD:
if (isTmuxGateway) {
return;
}
[[iTermController sharedInstance] irAdvance:1];
break;
case KEY_ACTION_IR_BACKWARD:
if (isTmuxGateway) {
return;
}
[[iTermController sharedInstance] irAdvance:-1];
break;
case KEY_ACTION_SELECT_PANE_LEFT:
Loading
Loading
@@ -1580,6 +1572,11 @@ static NSString *kTmuxFontChanged = @"kTmuxFontChanged";
break;
}
} else {
// Key is not bound to an action.
if (!EXIT && tmuxMode_ == TMUX_GATEWAY) {
[self handleKeypressInTmuxGateway:unicode];
return;
}
if (debugKeyDown) {
NSLog(@"PTYSession keyDown no keybinding action");
}
Loading
Loading
@@ -3765,12 +3762,20 @@ static long long timeInTenthsOfSeconds(struct timeval t)
}
}
 
- (BOOL)tmuxSetSecureLogging:(BOOL)secureLogging {
tmuxSecureLogging_ = secureLogging;
}
- (void)tmuxWriteData:(NSData *)data
{
if (EXIT) {
return;
}
TmuxLog(@"Write to tmux: \"%@\"", [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]);
if (tmuxSecureLogging_) {
TmuxLog(@"Write to tmux.");
} else {
TmuxLog(@"Write to tmux: \"%@\"", [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]);
}
if (tmuxLogging_) {
[self printTmuxMessage:[[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]];
}
Loading
Loading
Loading
Loading
@@ -136,7 +136,9 @@ typedef struct PTYFontInfo PTYFontInfo;
VT100Screen *dataSource;
id _delegate;
 
//selection
// selection goes from startX,startY to endX,endY. The end may be before or after the start.
// While the selection is being made (the mouse was clicked and is being dragged) the end
// position moves with the cursor.
int startX, startY, endX, endY;
int oldStartX, oldStartY, oldEndX, oldEndY;
char oldSelectMode;
Loading
Loading
@@ -175,6 +177,19 @@ typedef struct PTYFontInfo PTYFontInfo;
 
NSMutableDictionary* fallbackFonts;
 
// Maps a NSNumber int consisting of color index, alternate fg semantics
// flag, bold flag, and background flag to NSColor*s.
NSMutableDictionary* dimmedColorCache_;
// Dimmed background color with alpha.
NSColor *cachedBackgroundColor_;
double cachedBackgroundColorAlpha_; // cached alpha value (comparable to another double)
// Previuos contrasting color returned
NSColor *memoizedContrastingColor_;
double memoizedMainRGB_[4]; // rgba for "main" color memoized.
double memoizedOtherRGB_[3]; // rgb for "other" color memoized.
// Indicates if a selection that scrolls the window is in progress.
// Negative value: scroll up.
// Positive value: scroll down.
Loading
Loading
This diff is collapsed.
Loading
Loading
@@ -34,6 +34,7 @@
@protocol PTYWindowDelegateProtocol
- (void) windowWillToggleToolbarVisibility: (id) sender;
- (void) windowDidToggleToolbarVisibility: (id) sender;
- (BOOL) lionFullScreen;
@end
 
// See http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=_setContentHasShadow
Loading
Loading
Loading
Loading
@@ -178,7 +178,8 @@ static CGSSetWindowBackgroundBlurRadiusFunction* GetCGSSetWindowBackgroundBlurRa
 
- (void)toggleFullScreen:(id)sender
{
if (![[PreferencePanel sharedInstance] lionStyleFullscreen]) {
if (![[self delegate] lionFullScreen] &&
![[PreferencePanel sharedInstance] lionStyleFullscreen]) {
// The user must have clicked on the toolbar arrow, but the pref is set
// to use traditional fullscreen.
[[self delegate] performSelector:@selector(toggleTraditionalFullScreenMode)
Loading
Loading
Loading
Loading
@@ -309,6 +309,8 @@ typedef enum {
kThreeFingerClickGesture,
kThreeFingerSwipeRight,
kThreeFingerSwipeLeft,
kThreeFingerSwipeUp,
kThreeFingerSwipeDown,
nil];
 
NSUInteger i = [keys indexOfObject:ident];
Loading
Loading
Loading
Loading
@@ -2295,10 +2295,11 @@ static float versionNumber;
}
NSDictionary *remotePrefs = [self _remotePrefs];
if (remotePrefs && [remotePrefs count]) {
NSDictionary *localPrefs = [NSDictionary dictionaryWithContentsOfFile:[self _prefsFilename]];
NSDictionary *localPrefs = [prefs dictionaryRepresentation];
// Iterate over each set of prefs and validate that the other has the same value for each key.
NSArray *exemptKeys = [NSArray arrayWithObjects:@"LoadPrefsFromCustomFolder",
@"PrefsCustomFolder", @"iTerm Version", nil];
for (NSString *key in localPrefs) {
if (![exemptKeys containsObject:key]) {
if (![key hasPrefix:@"NS"] &&
Loading
Loading
Loading
Loading
@@ -265,7 +265,7 @@ NSWindowDelegate,
// smartLayout: If true then position windows using the "smart layout"
// algorithm.
// windowType: WINDOW_TYPE_NORMAL, WINDOW_TYPE_FULL_SCREEN, WINDOW_TYPE_TOP, or
// WINDOW_TYPE_LION_FULL_SCREEN, or WINDOW_TYPE_BOTTOM.
// WINDOW_TYPE_LION_FULL_SCREEN, or WINDOW_TYPE_BOTTOM or WINDOW_TYPE_LEFT.
// screen: An index into [NSScreen screens], or -1 to let the system pick a
// screen.
- (id)initWithSmartLayout:(BOOL)smartLayout
Loading
Loading
@@ -990,6 +990,7 @@ NSWindowDelegate,
 
- (BOOL)_haveLeftBorder;
- (BOOL)_haveBottomBorder;
- (BOOL)_haveTopBorder;
- (BOOL)_haveRightBorder;
 
@end
Loading
Loading
Loading
Loading
@@ -218,7 +218,8 @@ NSString *sessionsKey = @"sessions";
screenNumber = n;
}
}
if (windowType == WINDOW_TYPE_TOP || windowType == WINDOW_TYPE_BOTTOM) {
if (windowType == WINDOW_TYPE_TOP || windowType == WINDOW_TYPE_BOTTOM
|| windowType == WINDOW_TYPE_LEFT) {
smartLayout = NO;
}
if (windowType == WINDOW_TYPE_NORMAL) {
Loading
Loading
@@ -252,6 +253,7 @@ NSString *sessionsKey = @"sessions";
switch (windowType) {
case WINDOW_TYPE_TOP:
case WINDOW_TYPE_BOTTOM:
case WINDOW_TYPE_LEFT:
initialFrame = [screen visibleFrame];
break;
 
Loading
Loading
@@ -309,6 +311,7 @@ NSString *sessionsKey = @"sessions";
switch (windowType) {
case WINDOW_TYPE_TOP:
case WINDOW_TYPE_BOTTOM:
case WINDOW_TYPE_LEFT:
styleMask = NSBorderlessWindowMask;
break;
 
Loading
Loading
@@ -324,7 +327,8 @@ NSString *sessionsKey = @"sessions";
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];
if (windowType == WINDOW_TYPE_TOP || windowType == WINDOW_TYPE_BOTTOM) {
if (windowType == WINDOW_TYPE_TOP || windowType == WINDOW_TYPE_BOTTOM
|| windowType == WINDOW_TYPE_LEFT) {
[myWindow setHasShadow:YES];
}
[myWindow _setContentHasShadow:NO];
Loading
Loading
@@ -1227,6 +1231,11 @@ NSString *sessionsKey = @"sessions";
rect.size.width = virtualScreenFrame.size.width;
rect.size.height = yScale * [[terminalArrangement objectForKey:TERMINAL_ARRANGEMENT_HEIGHT] doubleValue];
rect.origin.y = virtualScreenFrame.size.height - rect.size.height;
} else if (windowType == WINDOW_TYPE_LEFT) {
rect.origin.x = xOrigin;
rect.origin.y = yOrigin;
rect.size.width = xScale * [[terminalArrangement objectForKey:TERMINAL_ARRANGEMENT_WIDTH] doubleValue];
rect.size.height = virtualScreenFrame.size.height;
}
 
[[NSColor blackColor] set];
Loading
Loading
@@ -1682,13 +1691,14 @@ NSString *sessionsKey = @"sessions";
 
- (void)canonicalizeWindowFrame {
PtyLog(@"canonicalizeWindowFrame");
PTYSession* session = [self currentSession];
NSDictionary* abDict = [session addressBookEntry];
NSScreen* screen = [[self window] deepestScreen];
if (!screen) {
PtyLog(@"No deepest screen");
NSDictionary* aDict = [[self currentSession] addressBookEntry];
// Try to use the screen of the current session. Fall back to the main
// screen if that's not an option.
int screenNumber = [aDict objectForKey:KEY_SCREEN] ? [[aDict objectForKey:KEY_SCREEN] intValue] : 0;
int screenNumber = [abDict objectForKey:KEY_SCREEN] ? [[abDict objectForKey:KEY_SCREEN] intValue] : 0;
NSArray* screens = [NSScreen screens];
if ([screens count] == 0) {
PtyLog(@"We are headless");
Loading
Loading
@@ -1741,6 +1751,23 @@ NSString *sessionsKey = @"sessions";
}
break;
 
case WINDOW_TYPE_LEFT:
frame.size.width = [[session TEXTVIEW] charWidth] * [[abDict objectForKey:KEY_COLUMNS] intValue];
frame.size.height = [screen visibleFrame].size.height;
frame.origin.y = [screen visibleFrame].origin.y;
if ([[self window] alphaValue] == 0) {
// Is hidden hotkey window
frame.origin.x = [screen visibleFrame].origin.x - frame.size.width;
} else {
// Normal case
frame.origin.x = [screen visibleFrame].origin.x;
}
if (frame.size.width > 0) {
[[self window] setFrame:frame display:YES];
}
break;
case WINDOW_TYPE_NORMAL:
PtyLog(@"Window type = NORMAL");
if (![self lionFullScreen]) {
Loading
Loading
@@ -2111,6 +2138,7 @@ NSString *sessionsKey = @"sessions";
(windowType_ != WINDOW_TYPE_FULL_SCREEN &&
windowType_ != WINDOW_TYPE_TOP &&
windowType_ != WINDOW_TYPE_BOTTOM &&
windowType_ != WINDOW_TYPE_LEFT &&
IsLionOrLater() &&
[[PreferencePanel sharedInstance] lionStyleFullscreen])) {
// Is 10.7 Lion or later.
Loading
Loading
@@ -2160,7 +2188,8 @@ NSString *sessionsKey = @"sessions";
- (void)toggleTraditionalFullScreenMode
{
[SessionView windowDidResize];
if (windowType_ == WINDOW_TYPE_TOP || windowType_ == WINDOW_TYPE_BOTTOM) {
if (windowType_ == WINDOW_TYPE_TOP || windowType_ == WINDOW_TYPE_BOTTOM
|| windowType_ == WINDOW_TYPE_LEFT) {
// TODO: would be nice if you could toggle top windows to fullscreen
return;
}
Loading
Loading
@@ -2296,6 +2325,9 @@ NSString *sessionsKey = @"sessions";
if ([newTerminal _haveBottomBorder]) {
--contentSize.height;
}
if ([newTerminal _haveTopBorder]) {
--contentSize.height;
}
 
[newTerminal fitWindowToTabSize:contentSize];
}
Loading
Loading
@@ -3824,8 +3856,20 @@ NSString *sessionsKey = @"sessions";
frame.origin.x = [[self window] frame].origin.x;
}
 
if (windowType_ == WINDOW_TYPE_LEFT) {
frame.size.height = self.screen.visibleFrame.size.height;
PTYSession* session = [self currentSession];
NSDictionary* abDict = [session addressBookEntry];
frame.size.width = ceil([[session TEXTVIEW] charWidth] *
[[abDict objectForKey:KEY_COLUMNS] intValue]) + decorationSize.width;
frame.origin.x = [[self window] frame].origin.x;
}
// Set the origin again to the bottom of screen
if (windowType_ == WINDOW_TYPE_BOTTOM) {
if (windowType_ == WINDOW_TYPE_BOTTOM
|| windowType_ == WINDOW_TYPE_LEFT) {
frame.origin.y = self.screen.visibleFrame.origin.y;
}
 
Loading
Loading
@@ -4080,19 +4124,16 @@ NSString *sessionsKey = @"sessions";
} else if ([broadcastViewIds_ count] == 1) {
// Turned on one session so add the current session.
[broadcastViewIds_ addObject:[NSNumber numberWithInt:[[[self currentSession] view] viewId]]];
if ([broadcastViewIds_ count] == 1) {
// The client did a bad thing by allowing you to toggle the current session! Abort!
broadcastMode_ = BROADCAST_OFF;
[broadcastViewIds_ removeAllObjects];
}
// NOTE: There may still be only one session. This is of use to focus
// follows mouse users who want to toggle particular panes.
}
for (PTYTab *aTab in [self tabs]) {
for (PTYSession *aSession in [aTab sessions]) {
[[aSession view] setNeedsDisplay:YES];
}
}
// Update dimming of panes.
[self _refreshTerminal:nil];
// Update dimming of panes.
[self _refreshTerminal:nil];
iTermApplicationDelegate *itad = (iTermApplicationDelegate *)[[iTermApplication sharedApplication] delegate];
[itad updateBroadcastMenuState];
}
Loading
Loading
@@ -4370,8 +4411,7 @@ NSString *sessionsKey = @"sessions";
if (![[PreferencePanel sharedInstance] showWindowBorder]) {
return NO;
} else if ([self anyFullScreen] ||
windowType_ == WINDOW_TYPE_TOP ||
windowType_ == WINDOW_TYPE_BOTTOM) {
windowType_ == WINDOW_TYPE_LEFT) {
return NO;
} else {
return YES;
Loading
Loading
@@ -4385,9 +4425,7 @@ NSString *sessionsKey = @"sessions";
if (![[PreferencePanel sharedInstance] showWindowBorder]) {
return NO;
} else if ([self anyFullScreen] ||
windowType_ == WINDOW_TYPE_TOP ||
windowType_ == WINDOW_TYPE_BOTTOM) {
// Only normal windows can have a left border
return NO;
} else if (![bottomBar isHidden]) {
// Bottom bar visible so no need for a lower border
Loading
Loading
@@ -4404,13 +4442,21 @@ NSString *sessionsKey = @"sessions";
}
}
 
- (BOOL)_haveTopBorder
{
BOOL tabBarVisible = [self tabBarShouldBeVisible];
BOOL topTabBar = ([[PreferencePanel sharedInstance] tabViewType] == PSMTab_TopTab);
BOOL visibleTopTabBar = (tabBarVisible && topTabBar);
return ([[PreferencePanel sharedInstance] showWindowBorder] &&
!visibleTopTabBar
&& windowType_ == WINDOW_TYPE_BOTTOM);
}
- (BOOL)_haveRightBorder
{
if (![[PreferencePanel sharedInstance] showWindowBorder]) {
return NO;
} else if ([self anyFullScreen] ||
windowType_ == WINDOW_TYPE_TOP ||
windowType_ == WINDOW_TYPE_BOTTOM) {
} else if ([self anyFullScreen]) {
return NO;
} else if (![[[self currentSession] SCROLLVIEW] isLegacyScroller] ||
![self scrollbarShouldBeVisible]) {
Loading
Loading
@@ -4443,7 +4489,9 @@ NSString *sessionsKey = @"sessions";
if ([self _haveBottomBorder]) {
++contentSize.height;
}
if ([self _haveTopBorder]) {
++contentSize.height;
}
return [[self window] frameRectForContentRect:NSMakeRect(0, 0, contentSize.width, contentSize.height)].size;
}
 
Loading
Loading
@@ -4555,6 +4603,9 @@ NSString *sessionsKey = @"sessions";
}
aRect.size = [[thisWindow contentView] frame].size;
aRect.size.height -= aRect.origin.y;
if ([self _haveTopBorder]) {
aRect.size.height -= 1;
}
aRect.size.width = [self tabviewWidth];
PtyLog(@"repositionWidgets - Set tab view size to %fx%f", aRect.size.width, aRect.size.height);
[TABVIEW setFrame:aRect];
Loading
Loading
@@ -4575,6 +4626,9 @@ NSString *sessionsKey = @"sessions";
}
aRect.size.height -= aRect.origin.y;
aRect.size.height -= [tabBarControl frame].size.height;
if ([self _haveTopBorder]) {
aRect.size.height -= 1;
}
aRect.size.width = [self tabviewWidth];
PtyLog(@"repositionWidgets - Set tab view size to %fx%f", aRect.size.width, aRect.size.height);
[TABVIEW setFrame:aRect];
Loading
Loading
@@ -4597,6 +4651,9 @@ NSString *sessionsKey = @"sessions";
[tabBarControl setAutoresizingMask:(NSViewWidthSizable | NSViewMaxYMargin)];
aRect.origin.y += [tabBarControl frame].size.height;
aRect.size.height = [[thisWindow contentView] frame].size.height - aRect.origin.y;
if ([self _haveTopBorder]) {
aRect.size.height -= 1;
}
PtyLog(@"repositionWidgets - Set tab view size to %fx%f", aRect.size.width, aRect.size.height);
[TABVIEW setFrame:aRect];
}
Loading
Loading
@@ -4768,7 +4825,8 @@ NSString *sessionsKey = @"sessions";
verticalSpacing:[[tempPrefs objectForKey:KEY_VERTICAL_SPACING] floatValue]];
 
if (windowType_ == WINDOW_TYPE_TOP ||
windowType_ == WINDOW_TYPE_BOTTOM) {
windowType_ == WINDOW_TYPE_BOTTOM ||
windowType_ == WINDOW_TYPE_LEFT) {
NSRect windowFrame = [[self window] frame];
BOOL hasScrollbar = [self scrollbarShouldBeVisible];
NSSize contentSize = [PTYScrollView contentSizeForFrameSize:windowFrame.size
Loading
Loading
Loading
Loading
@@ -27,6 +27,7 @@
- (void)tmuxSessionRenamed:(NSString *)newName;
- (NSSize)tmuxBookmarkSize; // rows, cols
- (int)tmuxNumHistoryLinesInBookmark;
- (BOOL)tmuxSetSecureLogging:(BOOL)secureLogging;
 
@end
 
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