Skip to content

Commit

Permalink
Fix a bug that stop opt-click to open url in background
Browse files Browse the repository at this point in the history
  • Loading branch information
yllan committed Aug 3, 2012
1 parent 34780f8 commit 4e1d559
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/YLView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,13 @@ - (void) mouseUp: (NSEvent *)e
column: (index % gColumn)];
if (url && !([e modifierFlags] & NSCommandKeyMask))
{
_shouldOpenUrlInBackground = [e modifierFlags] & NSAlternateKeyMask;
_shouldOpenUrlInBackground = (([e modifierFlags] & NSAlternateKeyMask) == NSAlternateKeyMask) ? YES : NO;
_shouldUseImagePreviewer = [gConfig shouldPreferImagePreviewer];
if ([e modifierFlags] & NSShiftKeyMask)
_shouldUseImagePreviewer = !_shouldUseImagePreviewer;

// Try to revert shortened URLs
if ([url length] < 25 && [url hasPrefix:@"http://"]) // FIXME: Need a better way to identify short URLs
if ([url length] < 25 && [url hasPrefix: @"http://"]) // FIXME: Need a better way to identify short URLs
{
[NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]
delegate:self];
Expand Down

0 comments on commit 4e1d559

Please sign in to comment.