aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-10 00:12:10 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-10 00:12:10 +0000
commit602633c84982f4e8061cde8a3cb09ada6c4d11bf (patch)
tree2e8745f819c54750e23ab3484ec647407ede2362 /Source/CMTextView.m
parenta252c9efe5f22cbdc8dd8343c7e2a6c631add785 (diff)
downloadsequelpro-602633c84982f4e8061cde8a3cb09ada6c4d11bf.tar.gz
sequelpro-602633c84982f4e8061cde8a3cb09ada6c4d11bf.tar.bz2
sequelpro-602633c84982f4e8061cde8a3cb09ada6c4d11bf.zip
• made lexer 64bit compatible
- 'int' has to be replaced by 'size_t' • F5 completion - if inside of backticks after completion move caret one char rightwards to go out of the backticks
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index 86e6955f..8346525b 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -230,6 +230,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
if([self getRangeForCurrentWord].length)
isDictMode = ([[[self textStorage] attribute:kQuote atIndex:[self getRangeForCurrentWord].location effectiveRange:nil] isEqualToString:kQuoteValue] );
+ BOOL dbStructureMode = ([[[self textStorage] attribute:kBTQuote atIndex:[self selectedRange].location-1 effectiveRange:nil] isEqualToString:kBTQuoteValue]) ? YES : NO;
+
// Refresh quote attributes
[[self textStorage] removeAttribute:kQuote range:NSMakeRange(0,[[self string] length])];
// [self insertText:@""];
@@ -246,7 +248,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
caseSensitive:!caseInsensitive
charRange:[self getRangeForCurrentWord]
inView:self
- dictMode:isDictMode];
+ dictMode:isDictMode
+ dbMode:dbStructureMode];
//Get the NSPoint of the first character of the current word
NSRange range = NSMakeRange([self getRangeForCurrentWord].location,0);