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

Add CurrentDir kvp escape code

parents 5a6c0a0f 5cb70178
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -546,6 +546,7 @@ typedef enum {
 
// Snapshot working directory for Trouter
- (void)logWorkingDirectoryAtLine:(long long)line;
- (void)logWorkingDirectoryAtLine:(long long)line withDirectory:(NSString *)workingDirectory;
- (NSString *)getWorkingDirectoryAtLine:(long long)line;
 
// Trouter change directory
Loading
Loading
Loading
Loading
@@ -6622,6 +6622,11 @@ static bool IsUrlChar(NSString* str)
- (void)logWorkingDirectoryAtLine:(long long)line
{
NSString *workingDirectory = [[dataSource shellTask] getWorkingDirectory];
[self logWorkingDirectoryAtLine:line withDirectory:workingDirectory];
}
- (void)logWorkingDirectoryAtLine:(long long)line withDirectory:(NSString *)workingDirectory
{
[workingDirectoryAtLines addObject:[NSArray arrayWithObjects:
[NSNumber numberWithLongLong:line],
workingDirectory,
Loading
Loading
Loading
Loading
@@ -2680,6 +2680,10 @@ static VT100TCC decode_string(unsigned char *datap,
[[[SCREEN display] window] makeKeyAndOrderFront:nil];
} else if ([key isEqualToString:@"ClearScrollback"]) {
[SCREEN clearBuffer];
} else if ([key isEqualToString:@"CurrentDir"]) {
long long lineNumber = [SCREEN absoluteLineNumberOfCursor];
[[[SCREEN session] TEXTVIEW] logWorkingDirectoryAtLine:lineNumber
withDirectory:value];
}
} else if (token.type == XTERMCC_SET_PALETTE) {
NSString* argument = token.u.string;
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