From 80cc881912625ce799fa1c435f2d5a2cc9445aaa Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 3 Dec 2013 11:14:58 -0800 Subject: [PATCH] :memo: Remove FIXME in Editor::transpose --- src/editor.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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()