Permalink
Browse files

Merge patch to disable smart quotes in editor

  • Loading branch information...
dmoagx committed Sep 18, 2014
2 parents a86bed3 + f4b384b commit 51b148d157ff11c5d2393b02584fbb203d710b11
Showing with 8 additions and 1 deletion.
  1. +4 −0 Source/SPBundleCommandTextView.m
  2. +1 −1 Source/SPQueryController.m
  3. +3 −0 Source/SPTextView.m
@@ -62,6 +62,10 @@ - (void)awakeFromNib
[commandScrollView setHasHorizontalRuler:NO];
[commandScrollView setHasVerticalRuler:YES];
[commandScrollView setRulersVisible:YES];
// disable typo stuff in 10.8+ SDK
[self setAutomaticDashSubstitutionEnabled:NO];
[self setAutomaticQuoteSubstitutionEnabled:NO];
// Re-define tab stops for a better editing
[self setTabStops];
@@ -338,7 +338,7 @@ - (NSUInteger)consoleMessageCount
#pragma mark Other
/**
* Called whenver the test within the search field changes.
* Called whenever the text within the search field changes.
*/
- (void)controlTextDidChange:(NSNotification *)notification
{
@@ -202,6 +202,9 @@ - (void) awakeFromNib
[self _setTextSelectionColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]] onBackgroundColor:backgroundColor];
[self setAutomaticDashSubstitutionEnabled:NO]; // prevents -- from becoming —, the em dash.
[self setAutomaticQuoteSubstitutionEnabled:NO]; // prevents ' and " from becoming ‘, ’ and “, ” respectively.
// Register observers for the when editor background colors preference changes
[prefs addObserver:self forKeyPath:SPCustomQueryEditorSelectionColor options:NSKeyValueObservingOptionNew context:NULL];
[prefs addObserver:self forKeyPath:SPCustomQueryEditorCaretColor options:NSKeyValueObservingOptionNew context:NULL];

0 comments on commit 51b148d

Please sign in to comment.