diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-01-11 22:30:30 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-01-11 22:30:30 +0000 |
commit | 73211a19046665d4c3ee66c215a37cd0e5b4c6bd (patch) | |
tree | 9122f5030c4e3664a310b173e614038cedae0b1f | |
parent | 05affe86aafe4bfc9561e9c850187aa3844da5d1 (diff) | |
download | sequelpro-73211a19046665d4c3ee66c215a37cd0e5b4c6bd.tar.gz sequelpro-73211a19046665d4c3ee66c215a37cd0e5b4c6bd.tar.bz2 sequelpro-73211a19046665d4c3ee66c215a37cd0e5b4c6bd.zip |
• fix for i525: do not escape the \ for \_ or \% and changed "contains" 's behaviour to escape _ % automatically since it could be confusing to the user because it uses LIKE '%...%'
• reimplemented: scroll to newly added row in Content View
-rw-r--r-- | Source/TableContent.m | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index 7a034c5f..7f8f5ab4 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -881,7 +881,7 @@ NSMutableString *arg = [[NSMutableString alloc] init]; [arg setString:argument]; - [arg replaceOccurrencesOfRegex:@"(\\\\)(?![nrt])" withString:@"\\\\\\\\\\\\\\\\"]; + [arg replaceOccurrencesOfRegex:@"(\\\\)(?![nrt_%])" withString:@"\\\\\\\\\\\\\\\\"]; [arg flushCachedRegexData]; [arg replaceOccurrencesOfRegex:@"(\\\\)(?=[nrt])" withString:@"\\\\\\"]; [arg flushCachedRegexData]; @@ -893,10 +893,10 @@ [arg replaceOccurrencesOfRegex:[NSString stringWithFormat:@"(%@)", quoteSign] withString:@"\\\\$1"]; [arg flushCachedRegexData]; } - if([clause isMatchedByRegex:@"(?i)\\blike\\b.*?%(?!@)"]) { - [arg replaceOccurrencesOfRegex:@"([_%])" withString:@"\\\\$1"]; - [arg flushCachedRegexData]; - } + // if([clause isMatchedByRegex:@"(?i)\\blike\\b.*?%(?!@)"]) { + // [arg replaceOccurrencesOfRegex:@"([_%])" withString:@"\\\\$1"]; + // [arg flushCachedRegexData]; + // } return [arg autorelease]; } @@ -1236,6 +1236,7 @@ [tableContentView reloadData]; [tableContentView selectRowIndexes:[NSIndexSet indexSetWithIndex:[tableContentView numberOfRows]-1] byExtendingSelection:NO]; + [tableContentView scrollRowToVisible:[tableContentView selectedRow]]; isEditingRow = YES; isEditingNewRow = YES; currentlyEditingRow = [tableContentView selectedRow]; |