aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-01 22:59:05 +0000
committerrowanbeentje <rowan@beent.je>2009-04-01 22:59:05 +0000
commit8fd7a25952b3d5317a22e14c83af06b56c32710a (patch)
tree215711b1c3be6b90011ff38c7fa658f7c2e3ae3c /Source/CustomQuery.m
parentac70439744db350206de86e14209fd84e750bb64 (diff)
downloadsequelpro-8fd7a25952b3d5317a22e14c83af06b56c32710a.tar.gz
sequelpro-8fd7a25952b3d5317a22e14c83af06b56c32710a.tar.bz2
sequelpro-8fd7a25952b3d5317a22e14c83af06b56c32710a.zip
- Add autopairing support to CMTextView - many thanks to Hans-Jörg Bibiko for the original patch (see http://code.google.com/p/sequel-pro/issues/detail?id=208 for full details). Applied with slight amendments.
- Further changes to make CMTextView more standalone and reusable - autopairing and autoindenting can now be enabled/disabled and checked. - Autopairing and autoindenting moved to app preferences.
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index e8c7af53..115c4d36 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -541,7 +541,7 @@ sets the connection (received from TableDocument) and makes things that have to
queryFavorites = [[NSMutableArray array] retain];
}
-//set up interface
+ // Set up the interface
[customQueryView setVerticalMotionCanBeginDrag:NO];
if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
[textView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
@@ -549,6 +549,9 @@ sets the connection (received from TableDocument) and makes things that have to
[textView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
}
[textView setContinuousSpellCheckingEnabled:NO];
+ [textView setAutoindent:[prefs boolForKey:@"CustomQueryAutoindent"]];
+ [textView setAutoindentIgnoresEnter:YES];
+ [textView setAutopair:[prefs boolForKey:@"CustomQueryAutopair"]];
[queryFavoritesView registerForDraggedTypes:[NSArray arrayWithObjects:@"SequelProPasteboard", nil]];
while ( (column = [enumerator nextObject]) )
{