From ce8f6e0e8272f01dd5a40e18062280698c1bfbc2 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Fri, 25 Nov 2022 13:37:04 +0000 Subject: [PATCH] Implement jump to start and end functionality --- filter.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/filter.go b/filter.go index 371d0fd..450db9d 100644 --- a/filter.go +++ b/filter.go @@ -181,6 +181,15 @@ func main() { lowerBound += 1 upperBound += 1 } + } else if ev.Key() == tcell.KeyCtrlE || ev.Key() == tcell.KeyEnd { + upperBound = len(*input) + lowerBound = upperBound - ymax + 2 + currentLine = len(*input) - 1 + } else if ev.Key() == tcell.KeyCtrlA || ev.Key() == tcell.KeyHome { + upperBound = ymax - 2 + lowerBound = 0 + currentLine = 0 + } } }