Move cursor to bottom of supply
This commit is contained in:
parent
943a8915e6
commit
45bf3ecdb0
2 changed files with 8 additions and 0 deletions
|
|
@ -592,6 +592,11 @@ class CursorTreeRenderer(Generic[E]):
|
||||||
self._render()
|
self._render()
|
||||||
self._focus_on_cursor()
|
self._focus_on_cursor()
|
||||||
|
|
||||||
|
def move_cursor_to_bottom(self) -> None:
|
||||||
|
self._cursor_id = None
|
||||||
|
self._render()
|
||||||
|
self._focus_on_cursor()
|
||||||
|
|
||||||
class BasicCursorRenderer(CursorRenderer):
|
class BasicCursorRenderer(CursorRenderer):
|
||||||
|
|
||||||
META_FORMAT = "%H:%M "
|
META_FORMAT = "%H:%M "
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,9 @@ class CursorTreeWidget(urwid.WidgetWrap):
|
||||||
elif key in {"down", "j"}:
|
elif key in {"down", "j"}:
|
||||||
self._tree.move_cursor_down()
|
self._tree.move_cursor_down()
|
||||||
self._invalidate()
|
self._invalidate()
|
||||||
|
elif key in {"esc", "end", "G"}:
|
||||||
|
self._tree.move_cursor_to_bottom()
|
||||||
|
self._invalidate()
|
||||||
elif key in {"shift up", "K"}:
|
elif key in {"shift up", "K"}:
|
||||||
self._tree.scroll(self._vertical_scroll_step)
|
self._tree.scroll(self._vertical_scroll_step)
|
||||||
self._invalidate()
|
self._invalidate()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue