           done = true
     e.abortKeyBinding() unless done
 
+  @toggleCurrent: ->
+    ed = atom.workspace.getActiveTextEditor()
+    for sel in ed.getSelections()
+      rs = @forLines ed, sel.getHeadBufferPosition().row, sel.getTailBufferPosition().row
+      rs.map (r) -> r.toggleTree()
+
   # Commands
 
   @activate: ->

    @editor.decorateMarker @marker, mark
    @disposables.add @marker.onDidChange (e) => @checkMarker e

  remove: ->
    @view.classList.add 'ink-hide'
    @timeout 200, => @destroy()

# TODO: better scrolling behaviour
{$, $$} = require 'atom-space-pen-views'
{CompositeDisposable} = require 'atom'
trees = require '../tree'

# ## Result API
# `Result`s are DOM elements which represent the result of some operation. They
