Method: Tree.subtree
- Defined in:
- lib/xiki/tree.rb
.subtree ⇒ Object
Returns subtree rooted at cursor.
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 |
# File 'lib/xiki/tree.rb', line 1639 def self.subtree # Just return line if no children return Line.value if ! Tree.has_child? orig = View.cursor left = Line.left Line.next ignore, right = Tree.sibling_bounds :cross_blank_lines=>1 View.cursor = orig txt = View.txt left, right txt end |