aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-19 11:36:19 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-19 11:36:19 +0000
commit3f813a65b0d41b4a1771349f27a2d0ccafb740f5 (patch)
tree0b13de4829c6709c4aa91954910b16f5523458a6 /Source
parentf0453a887ea5e150c5083bb51c9e9a7e49691138 (diff)
downloadsequelpro-3f813a65b0d41b4a1771349f27a2d0ccafb740f5.tar.gz
sequelpro-3f813a65b0d41b4a1771349f27a2d0ccafb740f5.tar.bz2
sequelpro-3f813a65b0d41b4a1771349f27a2d0ccafb740f5.zip
• improved replacing selection of Bundle commands - intersect ranges in beforehand for safety reasons
• removed Serialize/Prettify JSON Bundles by Toggle JSON Format which auto-detects the JSON format to decide whether to serialize or pretty print
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTextViewAdditions.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 47263311..750527f1 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -742,8 +742,9 @@
}
else if([action isEqualToString:SPBundleOutputActionReplaceSelection]) {
- [self shouldChangeTextInRange:replaceRange replacementString:output];
- [self replaceCharactersInRange:replaceRange withString:output];
+ NSRange safeRange = NSIntersectionRange(replaceRange, NSMakeRange(0, [[self string] length]));
+ [self shouldChangeTextInRange:safeRange replacementString:output];
+ [self replaceCharactersInRange:safeRange withString:output];
}
} else {