Method: Tree.subtree
- Defined in:
- lib/xiki/tree.rb
.subtree ⇒ Object
Returns subtree rooted at cursor.
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 |
# File 'lib/xiki/tree.rb', line 1629 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 |