aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-30 14:42:50 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-30 14:42:50 +0000
commit78381153755568f86fef8896156ae8b841ef7179 (patch)
treeb30247dc53581b8d1743709cbb110e67be8c304b /Source/CustomQuery.m
parent1927d1cd94f0b728867238ffbceb9ef50b0e20e1 (diff)
downloadsequelpro-78381153755568f86fef8896156ae8b841ef7179.tar.gz
sequelpro-78381153755568f86fef8896156ae8b841ef7179.tar.bz2
sequelpro-78381153755568f86fef8896156ae8b841ef7179.zip
• added observer for all Query Editor colors to avoid initialising colors each time for syntax highlighting which speed it up a bit; now if one changes a color the changes are done in view after a delay of 0.1 s if text buffer < 100k for speed reasons
• fixed: before highlighting the current query ensure that the text storage is in a stable and clean status; otherwise SP crashes for ranges which aren't rendered yet
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index f30e19ca..251f19cc 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1281,6 +1281,16 @@
[textView setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
[textView setQueryEditorBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
+
+ [textView setCommentColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]]];
+ [textView setQuoteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]]];
+ [textView setKeywordColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]]];
+ [textView setBacktickColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBacktickColor]]];
+ [textView setNumericColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorNumericColor]]];
+ [textView setVariableColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorVariableColor]]];
+ [textView setOtherTextColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorTextColor]]];
+ [textView setTextColor:[textView otherTextColor]];
+
[textView setShouldHiliteQuery:[prefs boolForKey:SPCustomQueryHighlightCurrentQuery]];
[customQueryView setVerticalMotionCanBeginDrag:NO];