aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-19 20:39:37 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-19 20:39:37 +0000
commit0106844012a76356853e08f965a46db685f98987 (patch)
tree27a72e8b65699eaefb310e56a449fed63277dfcb /Source/SPTextView.m
parent06c03ea6543b7d38d1b17d5ac8f8416814708eb5 (diff)
downloadsequelpro-0106844012a76356853e08f965a46db685f98987.tar.gz
sequelpro-0106844012a76356853e08f965a46db685f98987.tar.bz2
sequelpro-0106844012a76356853e08f965a46db685f98987.zip
• invoke auto-completion only if the length of the pending edits is 1 (user typed one character) to suppress it while pasting or inserting larger text chunks
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index bfc90581..95d959c6 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -3052,7 +3052,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
}
// Start autocompletion if enabled
- if([[NSApp keyWindow] firstResponder] == self && [prefs boolForKey:SPCustomQueryAutoComplete] && !completionIsOpen && editedMask != 1 && [textStore editedRange].length)
+ if([[NSApp keyWindow] firstResponder] == self && [prefs boolForKey:SPCustomQueryAutoComplete] && !completionIsOpen && editedMask != 1 && [textStore changeInLength] == 1)
[self performSelector:@selector(doAutoCompletion) withObject:nil afterDelay:[[prefs valueForKey:SPCustomQueryAutoCompleteDelay] doubleValue]];
// Cancel calling doSyntaxHighlighting for large text