Skip to content

Commit

Permalink
Merge branch 'develop'; Version 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slazyk committed Apr 24, 2014
2 parents e1abbdb + 04f6ca6 commit d6c25a1
Show file tree
Hide file tree
Showing 13 changed files with 517 additions and 300 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## Changelog

#### 2.0.1 - 2014/04/25
**A minor update with small bugfixes and improvements, including:**

* Replaced letter- and prefix- caches with simple cached results stack
thus making backspacing much faster (Issue #29)
* Previous/Next completion shortcuts now work properly (Issue #36)
* Completion List now automatically shows for one letter (Issue #37)
* Hide Inline Preview more reliably when disabled in settings
* Moved FuzzyAutocomplete menu item into Editor menu
* Added option to disable plugin in settings
* Fixed alphabetical sorting of results when using parallel scoring
* Reliability++
* Performance++


#### 2.0.0 - 2014/04/16
**A major update introducing many fixes and improvements, including:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

@interface DVTTextCompletionInlinePreviewController (FuzzyAutocomplete)

/// Swizzles methods to enable/disable the plugin
+ (void) fa_swizzleMethods;

/// Matched ranges mapped to preview space.
@property (nonatomic, retain) NSArray * fa_matchedRanges;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@implementation DVTTextCompletionInlinePreviewController (FuzzyAutocomplete)

+ (void) load {
+ (void) fa_swizzleMethods {
[self jr_swizzleMethod: @selector(ghostComplementRange)
withMethod: @selector(_fa_ghostComplementRange)
error: NULL];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@

@interface DVTTextCompletionListWindowController (FuzzyAutocomplete)

/// Swizzles methods to enable/disable the plugin
+ (void) fa_swizzleMethods;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@implementation DVTTextCompletionListWindowController (FuzzyAutocomplete)

+ (void) load {
+ (void) fa_swizzleMethods {
[self jr_swizzleMethod: @selector(tableView:willDisplayCell:forTableColumn:row:)
withMethod: @selector(_fa_tableView:willDisplayCell:forTableColumn:row:)
error: NULL];
Expand Down Expand Up @@ -209,15 +209,19 @@ - (void) _fa_hackModifyRowHeight {
NSTableView * tableView = [self valueForKey: @"_completionsTableView"];
FATextCompletionListHeaderView * header = (FATextCompletionListHeaderView *) tableView.headerView;
NSInteger rows = MIN(8, [self.session.filteredCompletionsAlpha count]);
double delta = header && rows ? (header.frame.size.height + 1) / rows : 0;

tableView.rowHeight += delta;
if (header && rows) {
tableView.rowHeight += (header.frame.size.height + 1) / rows;
}
}

// Restore the original row height.
- (void) _fa_hackRestoreRowHeight {
NSTableView * tableView = [self valueForKey: @"_completionsTableView"];
tableView.rowHeight = [objc_getAssociatedObject(self, &kRowHeightKey) doubleValue];
double rowHeight = [objc_getAssociatedObject(self, &kRowHeightKey) doubleValue];
if (rowHeight > 0) {
tableView.rowHeight = rowHeight;
}
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

@interface DVTTextCompletionSession (FuzzyAutocomplete)

/// Swizzles methods to enable/disable the plugin
+ (void) fa_swizzleMethods;

/// Current filtering query.
- (NSString *) fa_filteringQuery;

Expand Down
Loading

0 comments on commit d6c25a1

Please sign in to comment.