   for selection in editor.getSelections()
     swrap(selection).fixPropertiesForLinewise()
 
+# Return function to restore
+# Used in vmp-move-selected-text
+swrap.switchToLinewise = (editor) ->
+  swrap.saveProperties(editor)
+  swrap.applyWise(editor, 'linewise')
+  new Disposable ->
+    swrap.normalize(editor)
+    swrap.applyWise(editor, 'characterwise')
+
 module.exports = swrap

{Range, Point} = require 'atom'
{
  translatePointAndClip
  getRangeByTranslatePointAndClip

    @setBufferRange([tail, head], options)
    @setReversedState(head.isLessThan(tail))

  applyColumnFromProperties: ->
    selectionProperties = @getProperties()
    return unless selectionProperties?
    {head, tail} = selectionProperties

    if @selection.isReversed()
      [start, end] = [head, tail]
    else
      [start, end] = [tail, head]
    [start.row, end.row] = @selection.getBufferRowRange()
    @setBufferRange([start, end])
    @translateSelectionEndAndClip('backward', translate: false)

  # set selections bufferRange with default option {autoscroll: false, preserveFolds: true}
  setBufferRange: (range, options={}) ->
    if options.keepGoalColumn ? true
