forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindContext.m
More file actions
61 lines (52 loc) · 1.29 KB
/
FindContext.m
File metadata and controls
61 lines (52 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// FindContext.m
// iTerm
//
// Created by George Nachman on 10/26/13.
//
//
#import "FindContext.h"
// Default max time per iteration of search.
static const NSTimeInterval kDefaultMaxTime = 0.1;
@implementation FindContext
@synthesize absBlockNum = absBlockNum_;
@synthesize substring = substring_;
@synthesize options = options_;
@synthesize dir = dir_;
@synthesize offset = offset_;
@synthesize stopAt = stopAt_;
@synthesize status = status_;
@synthesize matchLength = matchLength_;
@synthesize results = results_;
@synthesize hasWrapped = hasWrapped_;
@synthesize maxTime = maxTime_;
- (id)init {
self = [super init];
if (self) {
maxTime_ = kDefaultMaxTime;
}
return self;
}
- (void)dealloc {
[results_ release];
[substring_ release];
[super dealloc];
}
- (void)copyFromFindContext:(FindContext *)other {
self.absBlockNum = other.absBlockNum;
self.substring = other.substring;
self.options = other.options;
self.dir = other.dir;
self.offset = other.offset;
self.stopAt = other.stopAt;
self.status = other.status;
self.matchLength = other.matchLength;
self.results = other.results;
self.hasWrapped = other.hasWrapped;
self.maxTime = other.maxTime;
}
- (void)reset {
self.substring = nil;
self.results = nil;
}
@end