Permalink
Browse files

Fixing edge case in “-_addStringBeforeSelectedLines:”.

  • Loading branch information...
1 parent df917df commit 4ff297358f40d6e611eeac6807856cbcff471bac Jan Weiß committed Aug 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 MyDocument.m
View
@@ -343,7 +343,7 @@ - (void)_addStringBeforeSelectedLines:(NSString *)string {
NSUInteger rangeEnd = NSMaxRange(range);
NSUInteger currentIndex = range.location;
- while (currentIndex < (rangeEnd + insertedCharacters)) {
+ while (currentIndex <= (rangeEnd + insertedCharacters)) {
NSUInteger startIndex, lineEndIndex, contentsEndIndex;
[mutableString getLineStart:&startIndex

0 comments on commit 4ff2973

Please sign in to comment.