diff --git a/src/editor.coffee b/src/editor.coffee index d286e187f..c5b83ef67 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1002,6 +1002,12 @@ class Editor extends Model deprecate("Use Editor::duplicateLines() instead") @duplicateLines() + # Public: Mutate the text of all the selections in a single transaction. + # + # All the changes made inside the given {Function} can be reverted with a + # single call to {::undo}. + # + # fn - A {Function} that will be called with each {Selection}. mutateSelectedText: (fn) -> @transact => fn(selection) for selection in @getSelections()