mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-25 06:29:27 +00:00
Command creation works with simple paste commands.
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
#import "KPKWindowAssociation.h"
|
||||
#import "NSString+Commands.h"
|
||||
|
||||
@interface MPAutotypeContext () {
|
||||
NSString *_evaluatedCommand;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPAutotypeContext
|
||||
|
||||
- (instancetype)initWithWindowAssociation:(KPKWindowAssociation *)association {
|
||||
@@ -46,12 +52,11 @@
|
||||
}
|
||||
|
||||
- (NSString *)evaluatedCommand {
|
||||
static NSString *evaluated;
|
||||
if(!evaluated) {
|
||||
if(!_evaluatedCommand) {
|
||||
NSString *placeholderFilled = [self.normalizedCommand evaluatePlaceholderWithEntry:self.entry];
|
||||
evaluated = [placeholderFilled resolveReferencesWithTree:self.entry.tree];
|
||||
_evaluatedCommand = [[placeholderFilled resolveReferencesWithTree:self.entry.tree] copy];
|
||||
}
|
||||
return evaluated;
|
||||
return _evaluatedCommand;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user