Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/MacVim/MMBackend.m
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,14 @@ - (void)handleInputEvent:(int)msgid data:(NSData *)data
// based.
int idx = *((int*)bytes);

// Also, this index doesn't take itself into account, so if the move is
// to a later tab, need to add one to it since Vim's tabpage_move *does*
// count the current tab.
int curtab_index = tabpage_index(curtab);
if (idx >= curtab_index) {
idx += 1;
}

tabpage_move(idx);
} else if (SetTextDimensionsMsgID == msgid || LiveResizeMsgID == msgid
|| SetTextDimensionsNoResizeWindowMsgID == msgid
Expand Down
5 changes: 4 additions & 1 deletion src/MacVim/PSMTabBarControl/source/PSMTabBarCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ - (NSImage*)dragImageForRect:(NSRect)cellFrame
if(([self state] == NSOnState) && ([[_controlView styleName] isEqualToString:@"Metal"]))
cellFrame.size.width += 1.0;
[_controlView lockFocus];
NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:cellFrame] autorelease];

NSBitmapImageRep *rep = [[self controlView] bitmapImageRepForCachingDisplayInRect:cellFrame];
[[self controlView] cacheDisplayInRect:cellFrame toBitmapImageRep:rep];

[_controlView unlockFocus];
NSImage *image = [[[NSImage alloc] initWithSize:[rep size]] autorelease];
[image addRepresentation:rep];
Expand Down