Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing edge case in “-_addStringBeforeSelectedLines:”.

  • Loading branch information...
commit 4ff297358f40d6e611eeac6807856cbcff471bac 1 parent df917df
Jan Weiß authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  MyDocument.m
View
2  MyDocument.m
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.