Skip to content

Commit

Permalink
Merge patch to disable smart quotes in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Sep 18, 2014
2 parents a86bed3 + f4b384b commit 51b148d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Source/SPBundleCommandTextView.m
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Source/SPQueryController.m
Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions Source/SPTextView.m
Expand Up @@ -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];
Expand Down

0 comments on commit 51b148d

Please sign in to comment.