Skip to content

Commit

Permalink
Merge branch 'release/3.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sonoisa committed Nov 18, 2018
2 parents 0b1f21c + 167ea62 commit 7f7ab1e
Show file tree
Hide file tree
Showing 25 changed files with 352 additions and 126 deletions.
2 changes: 2 additions & 0 deletions FindPanel/Controllers/OgreAdvancedFindPanelController.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,6 @@
- (BOOL)inSelectionScopeOption;
- (void)setInSelectionScopeOption:(BOOL)inSelectionScopeOption;

- (NSString*)version;

@end
27 changes: 23 additions & 4 deletions FindPanel/Controllers/OgreAdvancedFindPanelController.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ - (void)restoreHistory:(NSDictionary*)history
if (start == contentsEnd) {
[item setTitle:@""];
} else {
[item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
// [item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
// スタイルを削除する
[item setTitle:[[attrString string] substringWithRange:NSMakeRange(start, contentsEnd - start)]];
}
[item setTarget:self];
[item setAction:@selector(selectReplaceHistory:)];
Expand Down Expand Up @@ -375,7 +377,12 @@ - (void)restoreHistory:(NSDictionary*)history
if (start == contentsEnd) {
[item setTitle:@""];
} else {
[item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
if ([self replaceWithStylesOption]) {
[item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
} else {
// スタイルを削除する
[item setTitle:[[attrString string] substringWithRange:NSMakeRange(start, contentsEnd - start)]];
}
}
[item setTarget:self];
[item setAction:@selector(selectReplaceHistory:)];
Expand Down Expand Up @@ -573,7 +580,9 @@ - (void)addFindHistory:(NSAttributedString*)attrString
if (start == contentsEnd) {
[item setTitle:@""];
} else {
[item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
// [item setAttributedTitle:[attrString attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
// スタイルは削除する。
[item setTitle:[string substringWithRange:NSMakeRange(start, contentsEnd - start)]];
}
[item setTarget:self];
[item setAction:@selector(selectFindHistory:)];
Expand Down Expand Up @@ -612,7 +621,12 @@ - (void)addReplaceHistory:(NSAttributedString*)string
if (start == contentsEnd) {
[item setTitle:@""];
} else {
[item setAttributedTitle:[string attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
if ([self replaceWithStylesOption]) {
[item setAttributedTitle:[string attributedSubstringFromRange:NSMakeRange(start, contentsEnd - start)]];
} else {
// スタイルを削除する
[item setTitle:[[string string] substringWithRange:NSMakeRange(start, contentsEnd - start)]];
}
}
[item setTarget:self];
[item setAction:@selector(selectReplaceHistory:)];
Expand Down Expand Up @@ -1676,6 +1690,11 @@ - (void)setInSelectionScopeOption:(BOOL)anInSelectionScopeOption
inSelectionScopeOption = anInSelectionScopeOption;
}

- (NSString*)version
{
return [OGRegularExpression version];
}

/* delegate methods of findTextView/replaceTextView */
- (BOOL)textView:(NSTextView*)aTextView shouldChangeTextInRange:(NSRange)affectedCharRange replacementString:(NSString*)replacementString
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Loading

0 comments on commit 7f7ab1e

Please sign in to comment.