Skip to content

Commit 2778ba3

Browse files
author
Kapil Borle
committed
Return self instead of new object ater EditableText.ApplyEdit
1 parent 50f7e2f commit 2778ba3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Engine/EditableText.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public EditableText ApplyEdit(TextEdit textEdit)
100100
currentLineNumber++;
101101
}
102102

103-
return new EditableText(String.Join(NewLine, lines));
103+
// returning self allows us to chain ApplyEdit calls.
104+
return this;
104105
}
105106

106107
// TODO Add a method that takes multiple edits, checks if they are unique and applies them.

0 commit comments

Comments
 (0)