Skip to content

Commit

Permalink
Merge pull request #82 from anakic/FixIndentLineBug
Browse files Browse the repository at this point in the history
Fix parameter to Replace
  • Loading branch information
dgrunwald committed Dec 25, 2015
2 parents 4e69c3c + 52b3c84 commit 19611ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public virtual void IndentLine(TextDocument document, DocumentLine line)
string indentation = document.GetText(indentationSegment);
// copy indentation to line
indentationSegment = TextUtilities.GetWhitespaceAfter(document, line.Offset);
document.Replace(indentationSegment.Offset, indentation.Length, indentation,
document.Replace(indentationSegment.Offset, indentationSegment.Length, indentation,
OffsetChangeMappingType.RemoveAndInsert);
// OffsetChangeMappingType.RemoveAndInsert guarantees the caret moves behind the new indentation.
}
Expand Down

0 comments on commit 19611ad

Please sign in to comment.