aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 11defa20..f04c6684 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -534,7 +534,7 @@
[[NSFileManager defaultManager] removeItemAtPath:bundleInputFilePath error:nil];
- BOOL selfIsQueryEditor = ([[[self class] description] isEqualToString:@"SPTextView"]) ;
+ BOOL selfIsQueryEditor = ([[[self class] description] isEqualToString:@"SPTextView"] && [self respondsToSelector:@selector(currentQueryRange)]) ;
if([cmdData objectForKey:SPBundleFileInputSourceKey])
inputAction = [[cmdData objectForKey:SPBundleFileInputSourceKey] lowercaseString];
@@ -553,7 +553,7 @@
if(!currentQueryRange.length)
currentQueryRange = currentSelectionRange;
- NSRange replaceRange = NSMakeRange(currentSelectionRange.location, 0);
+ NSRange replaceRange = currentSelectionRange;
if([inputAction isEqualToString:SPBundleInputSourceSelectedText]) {
if(!currentSelectionRange.length) {
if([inputFallBackAction isEqualToString:SPBundleInputSourceCurrentWord])