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

Modify copy-with-styles to copy URLs of hyperlinks

parent ad738778
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -32,6 +32,7 @@
#import "iTermTextExtractor.h"
#import "iTermTextViewAccessibilityHelper.h"
#import "iTermURLActionFactory.h"
#import "iTermURLStore.h"
#import "iTermWebViewWrapperViewController.h"
#import "iTermWarning.h"
#import "MovePaneController.h"
Loading
Loading
@@ -3575,6 +3576,12 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
if ([iTermAdvancedSettingsModel excludeBackgroundColorsFromCopiedStyle]) {
attributes = [attributes dictionaryByRemovingObjectForKey:NSBackgroundColorAttributeName];
}
if (c.urlCode) {
NSURL *url = [[iTermURLStore sharedInstance] urlForCode:c.urlCode];
if (url != nil) {
attributes = [attributes dictionaryBySettingObject:url forKey:NSLinkAttributeName];
}
}
 
return attributes;
}
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