From 427468c6a87db8d4d9cef6a8c64a0203f512491a Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Mon, 25 Feb 2019 07:44:42 -0600 Subject: [PATCH] UI Mode: Add 'g' and 'G' --- screen_main.go | 6 ++++++ task_ops.go | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/screen_main.go b/screen_main.go index f085102..90d6898 100644 --- a/screen_main.go +++ b/screen_main.go @@ -182,6 +182,12 @@ func (screen *MainScreen) handleKeyEvent(event termbox.Event) int { } else if event.Ch == 'k' || event.Key == termbox.KeyArrowUp { screen.moveCursorUp() + } else if event.Ch == 'G' { + screen.cursor[screen.currentList] = len(*screen.displayList) - 1 + + } else if event.Ch == 'g' { + screen.cursor[screen.currentList] = 0 + } else if event.Ch == '/' { screen.startFilter() diff --git a/task_ops.go b/task_ops.go index 8604b5b..9da0de6 100644 --- a/task_ops.go +++ b/task_ops.go @@ -78,11 +78,6 @@ func (a *AppState) opToggleTaskComplete(args []string) int { } func (a *AppState) opArchiveTasks(args []string) int { - if err := app.LoadDoneList(); err != nil { - fmt.Println("Error loading 'Done' list") - fmt.Println(err.Error()) - return 1 - } if len(args) > 0 { for _, v := range args { var id int