Move cursor to bottom of supply

This commit is contained in:
Joscha 2019-06-09 14:42:56 +00:00
parent 943a8915e6
commit 45bf3ecdb0
2 changed files with 8 additions and 0 deletions

View file

@ -592,6 +592,11 @@ class CursorTreeRenderer(Generic[E]):
self._render()
self._focus_on_cursor()
def move_cursor_to_bottom(self) -> None:
self._cursor_id = None
self._render()
self._focus_on_cursor()
class BasicCursorRenderer(CursorRenderer):
META_FORMAT = "%H:%M "

View file

@ -56,6 +56,9 @@ class CursorTreeWidget(urwid.WidgetWrap):
elif key in {"down", "j"}:
self._tree.move_cursor_down()
self._invalidate()
elif key in {"esc", "end", "G"}:
self._tree.move_cursor_to_bottom()
self._invalidate()
elif key in {"shift up", "K"}:
self._tree.scroll(self._vertical_scroll_step)
self._invalidate()