diff --git a/src/editor.coffee b/src/editor.coffee index 1331974cc..ccd8708ec 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -1251,11 +1251,9 @@ class Editor # Public: Transposes the current text selections. # - # FIXME: I have no idea what this function does. - # - # This only works if there is more than one selection. Each selection is transferred - # to the position of the selection after it. The last selection is transferred to the - # position of the first. + # The text in each selection is reversed so `abcd` would become `dcba`. The + # characters before and after the cursor are swapped when the selection is + # empty so `x|y` would become `y|x` where `|` is the cursor location. transpose: -> @mutateSelectedText (selection) => if selection.isEmpty()