From: Armaan Bhojwani Date: Sun, 31 Jan 2021 04:02:31 +0000 (-0500) Subject: Add keybindings to go to start and end of stack X-Git-Tag: v0.1.0~2 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=8d942ddfc5edc0e388206ca489fa386dd80a2ce2 Add keybindings to go to start and end of stack --- diff --git a/lightcards/display.py b/lightcards/display.py index a4d6f2b..aa331b1 100755 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -98,3 +98,9 @@ def get_key(stdscr, stack, headers, idx): elif key in ["i", "/"]: stack[idx.getIdx()].toggleStar() disp_card(stdscr, stack, headers, idx) + elif key in ["0", "^", "KEY_HOME"]: + idx.setIdx(0) + disp_card(stdscr, stack, headers, idx) + elif key in ["$", "KEY_END"]: + idx.setIdx(len(stack) - 1) + disp_card(stdscr, stack, headers, idx)