diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-11-04 19:42:28 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-11-04 19:42:28 +0000 |
commit | 55183c8fd5bc6d0c84d38255a4b0fafd42f6cbbe (patch) | |
tree | 6fba1cf5016c46ae7d352841b58b39e5f23b01c0 /Source | |
parent | 7ec65d2959ffd49ba9d3d9efccfa9aef766ec280 (diff) | |
download | sequelpro-55183c8fd5bc6d0c84d38255a4b0fafd42f6cbbe.tar.gz sequelpro-55183c8fd5bc6d0c84d38255a4b0fafd42f6cbbe.tar.bz2 sequelpro-55183c8fd5bc6d0c84d38255a4b0fafd42f6cbbe.zip |
• improved completion regarding leading mathematical operators
- this also improves alias parsing
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTextView.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m index ec54f3a7..e60a28f7 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -644,7 +644,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) for(NSUInteger i=0; i<[lineHead length]; i++) if([lineHead characterAtIndex:i]=='`') caretIsInsideBackticks = !caretIsInsideBackticks; - NSCharacterSet *whiteSpaceCharSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; + NSMutableCharacterSet *breakCharSet = [NSMutableCharacterSet characterSetWithCharactersInString:@",;(+=-*/%><~&|^"]; + [breakCharSet formUnionWithCharacterSet:[NSCharacterSet whitespaceCharacterSet]]; NSUInteger start = caretPos; NSInteger backticksCounter = (caretIsInsideBackticks) ? 1 : 0; NSInteger pointCounter = 0; @@ -658,7 +659,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) while(start > 0 && doParsing) { currentCharacter = [[self string] characterAtIndex:--start]; - if(!(backticksCounter%2) && ([whiteSpaceCharSet characterIsMember:currentCharacter] || currentCharacter == ',' || currentCharacter == '(')) { + if(!(backticksCounter%2) && [breakCharSet characterIsMember:currentCharacter]) { start++; break; } |