diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2013-03-20 20:04:30 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2013-03-20 20:10:22 +0000 |
commit | 57913bf6705cf3f16c738278550777822f7c4584 (patch) | |
tree | 8c84121f26af0a2f5f3eff85ab046a84101584dd /alot/foreign/urwidtrees | |
parent | d3c1880a60ddd8ded397d92cddf310a948b97fdc (diff) |
fix issue with computing last decendant in NestedTree
Diffstat (limited to 'alot/foreign/urwidtrees')
-rw-r--r-- | alot/foreign/urwidtrees/nested.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/alot/foreign/urwidtrees/nested.py b/alot/foreign/urwidtrees/nested.py index 3c7035b3..8d254e07 100644 --- a/alot/foreign/urwidtrees/nested.py +++ b/alot/foreign/urwidtrees/nested.py @@ -356,3 +356,11 @@ class NestedTree(Tree): def prev_sibling_position(self, pos): candidate = self._prev_sibling_position(self._tree, pos) return self._sanitize_position(candidate, self._tree) + + def last_decendant(self, pos): + def lastd(pos): + c = self.last_child_position(pos) + if c is not None: + c = self.last_sibling_position(c) + return c + return self._last_in_direction(pos, lastd) |