diff options
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 5fbeaf39..4dc2711d 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -178,12 +178,10 @@ if (stateTimer != nil) { [stateTimer invalidate]; [stateTimer release]; - stateTimer = nil; } closeMe = YES; [theView setCompletionIsOpen:NO]; - [super close]; } @@ -328,12 +326,12 @@ if(caretPos.y >= 0 && caretPos.y < [self frame].size.height) { - caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5f); + caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5); isAbove = YES; } if(caretPos.y < 0 && (mainScreen.size.height-[self frame].size.height) < (caretPos.y*-1)) { - caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5f); + caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5); isAbove = YES; } @@ -346,7 +344,7 @@ [self setLevel:NSNormalWindowLevel]; [self setHidesOnDeactivate:YES]; [self setHasShadow:YES]; - [self setAlphaValue:0.9f]; + [self setAlphaValue:0.9]; NSScrollView* scrollView = [[[NSScrollView alloc] initWithFrame:NSZeroRect] autorelease]; [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; @@ -732,10 +730,10 @@ if(caretPos.y >= 0 && (isAbove || caretPos.y < newHeight)) { isAbove = YES; - old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5f); + old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5); } if(caretPos.y < 0 && (isAbove || ([self rectOfMainScreen].size.height-newHeight) < (caretPos.y*-1))) - old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5f); + old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5); // newHeight is currently the new height for theTableView, but we need to resize the whole window // so here we use the difference in height to find the new height for the window @@ -984,7 +982,7 @@ // Restore the text selection location, and clearly mark the autosuggested text [theView setSelectedRange:NSMakeRange(currentSelectionPosition, 0)]; - NSMutableAttributedStringAddAttributeValueRange([theView textStorage], NSForegroundColorAttributeName, [[theView otherTextColor] colorWithAlphaComponent:0.3f], NSMakeRange(currentSelectionPosition, [toInsert length])); + NSMutableAttributedStringAddAttributeValueRange([theView textStorage], NSForegroundColorAttributeName, [[theView otherTextColor] colorWithAlphaComponent:0.3], NSMakeRange(currentSelectionPosition, [toInsert length])); NSMutableAttributedStringAddAttributeValueRange([theView textStorage], kSPAutoCompletePlaceholderName, kSPAutoCompletePlaceholderVal, NSMakeRange(currentSelectionPosition, [toInsert length])); [self checkSpaceForAllowedCharacter]; |