diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2014-09-06 17:30:26 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@abhibeckert.com> | 2014-09-06 17:30:26 +1000 |
commit | 198a0622e41f0fb73d4abf462db1e4c204c85b54 (patch) | |
tree | fd7f0579996a1abf300013341000951c026e2f59 /Source | |
parent | 29be07630c2a965d01bb61fa2cc9d9f14dd4a8b5 (diff) | |
parent | e2d1e9461a224a280549007a9f02ea364a3dca49 (diff) | |
download | sequelpro-198a0622e41f0fb73d4abf462db1e4c204c85b54.tar.gz sequelpro-198a0622e41f0fb73d4abf462db1e4c204c85b54.tar.bz2 sequelpro-198a0622e41f0fb73d4abf462db1e4c204c85b54.zip |
Merge pull request #1982 from abhibeckert/master
Add pref to disable backticks in completions
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 | ||||
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 6 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 76f51f49..6c9f4a68 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -342,6 +342,7 @@ extern NSString *SPCustomQueryUpdateAutoHelp; extern NSString *SPCustomQueryAutoHelpDelay; extern NSString *SPCustomQueryHighlightCurrentQuery; extern NSString *SPCustomQueryEditorTabStopWidth; +extern NSString *SPCustomQueryEditorCompleteWithBackticks; extern NSString *SPCustomQueryAutoComplete; extern NSString *SPCustomQueryAutoCompleteDelay; extern NSString *SPCustomQueryFunctionCompletionInsertsArguments; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 6b986506..eb11ac11 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -148,6 +148,7 @@ NSString *SPCustomQueryUpdateAutoHelp = @"CustomQueryUpdateAutoHelp"; NSString *SPCustomQueryAutoHelpDelay = @"CustomQueryAutoHelpDelay"; NSString *SPCustomQueryHighlightCurrentQuery = @"CustomQueryHighlightCurrentQuery"; NSString *SPCustomQueryEditorTabStopWidth = @"CustomQueryEditorTabStopWidth"; +NSString *SPCustomQueryEditorCompleteWithBackticks = @"SPCustomQueryEditorCompleteWithBackticks"; NSString *SPCustomQueryAutoComplete = @"CustomQueryAutoComplete"; NSString *SPCustomQueryAutoCompleteDelay = @"CustomQueryAutoCompleteDelay"; NSString *SPCustomQueryFunctionCompletionInsertsArguments = @"CustomQueryFunctionCompletionInsertsArguments"; diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 0f16ed61..77ea9fbe 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -1124,7 +1124,11 @@ // Is completion string a schema name for current connection if([selectedItem objectForKey:@"isRef"]) { backtickMode = 100; // suppress move the caret one step rightwards - [self insert_text:[candidateMatch backtickQuotedString]]; + if ([prefs boolForKey:SPCustomQueryEditorCompleteWithBackticks]) { + [self insert_text:[candidateMatch backtickQuotedString]]; + } else { + [self insert_text:candidateMatch]; + } } else { [self insert_text:candidateMatch]; } |