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

Escape recent directory when double clicking on it in toolbelt. Issue 4150

parent 76fe643f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -14,6 +14,7 @@
#import "iTermShellHistoryController.h"
#import "iTermToolWrapper.h"
#import "NSDateFormatterExtras.h"
#import "NSStringITerm.h"
#import "NSTableColumn+iTerm.h"
#import "PTYSession.h"
 
Loading
Loading
@@ -231,10 +232,11 @@ static const CGFloat kHelpMargin = 5;
iTermRecentDirectoryMO *entry = filteredEntries_[selectedIndex];
iTermToolWrapper *wrapper = self.toolWrapper;
NSString *text;
NSString *escapedPath = [entry.path stringWithEscapedShellCharacters];
if ([NSEvent modifierFlags] & NSAlternateKeyMask) {
text = [@"cd " stringByAppendingString:entry.path];
text = [@"cd " stringByAppendingString:escapedPath];
} else {
text = entry.path;
text = escapedPath;
}
if (([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask)) {
text = [text stringByAppendingString:@"\n"];
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