Skip to content

Commit 51b148d

Browse files
committed
Merge patch to disable smart quotes in editor
2 parents a86bed3 + f4b384b commit 51b148d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Source/SPBundleCommandTextView.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ - (void)awakeFromNib
6262
[commandScrollView setHasHorizontalRuler:NO];
6363
[commandScrollView setHasVerticalRuler:YES];
6464
[commandScrollView setRulersVisible:YES];
65+
66+
// disable typo stuff in 10.8+ SDK
67+
[self setAutomaticDashSubstitutionEnabled:NO];
68+
[self setAutomaticQuoteSubstitutionEnabled:NO];
6569

6670
// Re-define tab stops for a better editing
6771
[self setTabStops];

Source/SPQueryController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ - (NSUInteger)consoleMessageCount
338338
#pragma mark Other
339339

340340
/**
341-
* Called whenver the test within the search field changes.
341+
* Called whenever the text within the search field changes.
342342
*/
343343
- (void)controlTextDidChange:(NSNotification *)notification
344344
{

Source/SPTextView.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ - (void) awakeFromNib
202202

203203
[self _setTextSelectionColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSelectionColor]] onBackgroundColor:backgroundColor];
204204

205+
[self setAutomaticDashSubstitutionEnabled:NO]; // prevents -- from becoming —, the em dash.
206+
[self setAutomaticQuoteSubstitutionEnabled:NO]; // prevents ' and " from becoming ‘, ’ and “, ” respectively.
207+
205208
// Register observers for the when editor background colors preference changes
206209
[prefs addObserver:self forKeyPath:SPCustomQueryEditorSelectionColor options:NSKeyValueObservingOptionNew context:NULL];
207210
[prefs addObserver:self forKeyPath:SPCustomQueryEditorCaretColor options:NSKeyValueObservingOptionNew context:NULL];

0 commit comments

Comments
 (0)