summaryrefslogtreecommitdiff
path: root/alot/foreign/urwidtrees
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2013-03-20 20:04:30 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2013-03-20 20:10:22 +0000
commit57913bf6705cf3f16c738278550777822f7c4584 (patch)
tree8c84121f26af0a2f5f3eff85ab046a84101584dd /alot/foreign/urwidtrees
parentd3c1880a60ddd8ded397d92cddf310a948b97fdc (diff)
fix issue with computing last decendant in NestedTree
Diffstat (limited to 'alot/foreign/urwidtrees')
-rw-r--r--alot/foreign/urwidtrees/nested.py8
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)