aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-07-01 13:22:55 +0000
committerBibiko <bibiko@eva.mpg.de>2010-07-01 13:22:55 +0000
commita9a21d7bb70a6e3b8a23bebe5678df93955727d0 (patch)
tree8d46dbd8a823e09fafcdcebeef792e2db800c76f /Source
parentc427a2b0ce515226750a50335aac04dc1161b385 (diff)
downloadsequelpro-a9a21d7bb70a6e3b8a23bebe5678df93955727d0.tar.gz
sequelpro-a9a21d7bb70a6e3b8a23bebe5678df93955727d0.tar.bz2
sequelpro-a9a21d7bb70a6e3b8a23bebe5678df93955727d0.zip
• suppress the check for upper-casing if found token is backticked explicitly
- this addresses i752 partially
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTextView.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index df66149f..bcda54e5 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -2550,21 +2550,26 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
case SPT_SINGLE_QUOTED_TEXT:
case SPT_DOUBLE_QUOTED_TEXT:
tokenColor = quoteColor;
+ allowToCheckForUpperCase = NO;
break;
case SPT_BACKTICK_QUOTED_TEXT:
tokenColor = backtickColor;
+ allowToCheckForUpperCase = NO;
break;
case SPT_RESERVED_WORD:
tokenColor = keywordColor;
break;
case SPT_NUMERIC:
tokenColor = numericColor;
+ allowToCheckForUpperCase = NO;
break;
case SPT_COMMENT:
tokenColor = commentColor;
+ allowToCheckForUpperCase = NO;
break;
case SPT_VARIABLE:
tokenColor = variableColor;
+ allowToCheckForUpperCase = NO;
break;
case SPT_WHITESPACE:
continue;
@@ -2585,7 +2590,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
// If the current token is marked as SQL keyword, uppercase it if required.
tokenEnd = tokenRange.location+tokenRange.length-1;
// Check the end of the token
- if (textBufferSizeIncreased && allowToCheckForUpperCase && autouppercaseKeywordsEnabled && !delBackwardsWasPressed
+ if (textBufferSizeIncreased
+ && allowToCheckForUpperCase
+ && autouppercaseKeywordsEnabled
+ && !delBackwardsWasPressed
&& [(NSString*)NSMutableAttributedStringAttributeAtIndex(textStore, kSQLkeyword, tokenEnd, nil) length])
// check if next char is not a kSQLkeyword or current kSQLkeyword is at the end;
// if so then upper case keyword if not already done