diff options
author | rowanbeentje <rowan@beent.je> | 2013-02-12 23:58:48 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-02-12 23:58:48 +0000 |
commit | 3a440aa512f3524545dc0b1ec39362d052ed4806 (patch) | |
tree | 45de2be00d65783be807140f5c34d0ef7c51b554 /Source/SPTextView.m | |
parent | 74aa78f132d4339164d1722c9008c00981e81bf6 (diff) | |
download | sequelpro-3a440aa512f3524545dc0b1ec39362d052ed4806.tar.gz sequelpro-3a440aa512f3524545dc0b1ec39362d052ed4806.tar.bz2 sequelpro-3a440aa512f3524545dc0b1ec39362d052ed4806.zip |
- Fix warnings and logic bugs; thanks to Steven Frank for highlighting these
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r-- | Source/SPTextView.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m index 5e324d28..e7f15e5e 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -1488,7 +1488,7 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS [possibleCompletions addObject:[NSDictionary dictionaryWithObjectsAndKeys: field, @"display", @"field-small-square", @"image", - [NSString stringWithFormat:@"%@@%%@",currentTable,currentDb], @"path", SPUniqueSchemaDelimiter, + [NSString stringWithFormat:@"%@%@%@", currentTable, SPUniqueSchemaDelimiter, currentDb], @"path", t, @"type", lst, @"list", @"", @"isRef", @@ -1497,7 +1497,7 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS [possibleCompletions addObject:[NSDictionary dictionaryWithObjectsAndKeys: field, @"display", @"field-small-square", @"image", - [NSString stringWithFormat:@"%@%@%@",currentTable,currentDb], @"path", SPUniqueSchemaDelimiter, + [NSString stringWithFormat:@"%@%@%@", currentTable, SPUniqueSchemaDelimiter, currentDb], @"path", typ, @"type", @"", @"isRef", nil]]; @@ -3252,7 +3252,7 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS NSUInteger currentSelectionLength = [self selectedRange].length; // If selection started/ended, redraw the background in the current query area - if ([self shouldHiliteQuery] && (currentSelectionLength && !proposedSelRange.length) || (!currentSelectionLength && proposedSelRange.length)) { + if ([self shouldHiliteQuery] && ((currentSelectionLength && !proposedSelRange.length) || (!currentSelectionLength && proposedSelRange.length))) { NSUInteger i = 0, rectCount = 0; NSRect* rectsToUpdate = [[self layoutManager] rectArrayForCharacterRange:[self queryRange] withinSelectedCharacterRange:[self queryRange] |