From 431f8480d7874e3f26514946c6ca93a4e7c3a33a Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 12:31:32 -0600 Subject: [PATCH 01/11] fix: indexing issue, re-toggle on autoread, and double use of within post --- internal/commands/commands.go | 2 +- internal/commands/key.go | 4 +- internal/commands/viewport.go | 88 +++++++++++++++++++++++++++++++---- 3 files changed, 82 insertions(+), 12 deletions(-) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 9823de5..7fdcd6f 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -252,7 +252,7 @@ func (c Commands) GetGlamourisedArticle(ID int) (string, error) { return "", fmt.Errorf("commands.FindGlamourisedArticle: %w", err) } - if c.config.AutoRead { + if c.config.AutoRead && !article.Read() { err = c.store.ToggleRead(article.ID) if err != nil { return "", fmt.Errorf("[commands.go] GetGlamourisedArticle: %w", err) diff --git a/internal/commands/key.go b/internal/commands/key.go index 6d8468d..577b80d 100644 --- a/internal/commands/key.go +++ b/internal/commands/key.go @@ -143,8 +143,8 @@ var ViewportKeyMap = ViewportKeyMapT{ key.WithHelp("o", "open in browser"), ), Favourite: key.NewBinding( - key.WithKeys("f"), - key.WithHelp("f", "favourite"), + key.WithKeys("F"), + key.WithHelp("F", "favourite"), ), Read: key.NewBinding( key.WithKeys("m"), diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index 4c72e43..6db6997 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -1,6 +1,9 @@ package commands import ( + "log" + "strings" + "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" @@ -64,17 +67,22 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { if err != nil { return m, tea.Quit } + + m.list.RemoveItem(m.list.Index()) cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.Prev): - current := m.list.Index() - if current-1 < 0 { + debugIndex(&m) + debugList(&m) + navIndex := getPrevIndex(&m) + debugNav(navIndex) + items := m.list.Items() + if isOutOfBounds(navIndex, len(items), &m) { return m, nil } - m.list.Select(current - 1) - items := m.list.Items() - item := items[current-1] + m.list.Select(navIndex) + item := items[navIndex] id := item.(TUIItem).ID m.selectedArticle = &id @@ -84,16 +92,20 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } m.viewport.SetContent(content) + cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.Next): - current := m.list.Index() + debugIndex(&m) + debugList(&m) + navIndex := getNextIndex(&m) + debugNav(navIndex) items := m.list.Items() - if current+1 >= len(items) { + if isOutOfBounds(navIndex, len(items), &m) { return m, nil } - m.list.Select(current + 1) - item := items[current+1] + m.list.Select(navIndex) + item := items[navIndex] id := item.(TUIItem).ID m.selectedArticle = &id @@ -103,6 +115,8 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } m.viewport.SetContent(content) + cmds = append(cmds, m.UpdateList()) + case key.Matches(msg, ViewportKeyMap.Quit): return m, tea.Quit @@ -122,6 +136,62 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, tea.Batch(cmds...) } +func isOutOfBounds(i int, l int, m *model) bool { + length := l - 1 + + // when autoread and don't show read the first opened item doesn't exist in list + if m.commands.config.AutoRead && !m.commands.config.ShowRead { + length = l + } + + if i < 0 || i > length || length <= 0 || (i == 0 && length <= 0) { + return true + } + return false +} + +func getNextIndex(m *model) int { + if m.commands.config.AutoRead && !m.commands.config.ShowRead { + return m.list.Index() + } + + // check for favorite within post + current, err := m.commands.store.GetItemByID(*m.selectedArticle) + if err != nil { + return m.list.Index() + } + if !m.commands.config.AutoRead && current.Read() && !m.commands.config.ShowRead { + return m.list.Index() + } + + return m.list.Index() + 1 +} + +func getPrevIndex(m *model) int { + if m.commands.config.AutoRead && !m.commands.config.ShowRead { + return m.list.Index() + } + + return m.list.Index() - 1 +} + +func debugIndex(m *model) { + log.Printf("Index: %d", m.list.Index()) +} + +func debugNav(i int) { + log.Printf("Nav: %d", i) +} + +func debugList(m *model) { + arr := []string{} + + for _, item := range m.list.Items() { + arr = append(arr, item.(TUIItem).Title) + } + log.Println(strings.Join(arr, ",")) +} + func viewportView(m model) string { return m.viewport.View() + "\n" + m.viewportHelp() } From 868052db3d0fe53c10055c32f83e3e8bd68eae5e Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 12:50:19 -0600 Subject: [PATCH 02/11] tweak: remove debug and add additional check on prev key --- internal/commands/viewport.go | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index 6db6997..2f9d0ed 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -1,9 +1,6 @@ package commands import ( - "log" - "strings" - "github.com/charmbracelet/bubbles/key" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" @@ -72,15 +69,17 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.Prev): - debugIndex(&m) - debugList(&m) navIndex := getPrevIndex(&m) - debugNav(navIndex) items := m.list.Items() if isOutOfBounds(navIndex, len(items), &m) { return m, nil } + // secondary check on autoread to prevent it navigating to next item on prev + if navIndex == 0 && m.commands.config.AutoRead && !m.commands.config.ShowRead { + return m, nil + } + m.list.Select(navIndex) item := items[navIndex] id := item.(TUIItem).ID @@ -95,10 +94,7 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.Next): - debugIndex(&m) - debugList(&m) navIndex := getNextIndex(&m) - debugNav(navIndex) items := m.list.Items() if isOutOfBounds(navIndex, len(items), &m) { return m, nil @@ -175,23 +171,6 @@ func getPrevIndex(m *model) int { return m.list.Index() - 1 } -func debugIndex(m *model) { - log.Printf("Index: %d", m.list.Index()) -} - -func debugNav(i int) { - log.Printf("Nav: %d", i) -} - -func debugList(m *model) { - arr := []string{} - - for _, item := range m.list.Items() { - arr = append(arr, item.(TUIItem).Title) - } - log.Println(strings.Join(arr, ",")) -} - func viewportView(m model) string { return m.viewport.View() + "\n" + m.viewportHelp() } From 9548375652ad5fbc33b502a14fffe294e6574b9b Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 13:26:28 -0600 Subject: [PATCH 03/11] tweak: check zero length --- internal/commands/viewport.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index 2f9d0ed..75e3085 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -133,14 +133,14 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } func isOutOfBounds(i int, l int, m *model) bool { - length := l - 1 + index := l - 1 // when autoread and don't show read the first opened item doesn't exist in list if m.commands.config.AutoRead && !m.commands.config.ShowRead { - length = l + index = l } - if i < 0 || i > length || length <= 0 || (i == 0 && length <= 0) { + if i < 0 || i > index || index < 0 || l == 0 { return true } return false From 5be49bda15615ce915fe75ac129c77acc87a0e04 Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 19:07:36 -0600 Subject: [PATCH 04/11] tweak: fix reverse autoread crash and reduce number of sqlite db queries --- internal/commands/viewport.go | 48 ++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index 75e3085..f725baa 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -30,6 +30,7 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { case key.Matches(msg, ViewportKeyMap.Escape): m.selectedArticle = nil + cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.OpenInBrowser): current, err := m.commands.store.GetItemByID(*m.selectedArticle) @@ -50,7 +51,6 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { if err != nil { return m, tea.Quit } - cmds = append(cmds, m.UpdateList()) case key.Matches(msg, ViewportKeyMap.Read): if m.commands.config.AutoRead { @@ -65,18 +65,14 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, tea.Quit } - m.list.RemoveItem(m.list.Index()) - cmds = append(cmds, m.UpdateList()) + if !m.commands.config.ShowRead { + m.list.RemoveItem(m.list.Index()) + } case key.Matches(msg, ViewportKeyMap.Prev): navIndex := getPrevIndex(&m) items := m.list.Items() - if isOutOfBounds(navIndex, len(items), &m) { - return m, nil - } - - // secondary check on autoread to prevent it navigating to next item on prev - if navIndex == 0 && m.commands.config.AutoRead && !m.commands.config.ShowRead { + if isPrevOutOfBounds(navIndex, &m) { return m, nil } @@ -91,12 +87,14 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } m.viewport.SetContent(content) - cmds = append(cmds, m.UpdateList()) + if m.commands.config.AutoRead && !m.commands.config.ShowRead { + m.list.RemoveItem(m.list.Index()) + } case key.Matches(msg, ViewportKeyMap.Next): navIndex := getNextIndex(&m) items := m.list.Items() - if isOutOfBounds(navIndex, len(items), &m) { + if isNextOutOfBounds(navIndex, len(items), &m) { return m, nil } @@ -111,7 +109,9 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } m.viewport.SetContent(content) - cmds = append(cmds, m.UpdateList()) + if m.commands.config.AutoRead && !m.commands.config.ShowRead { + m.list.RemoveItem(m.list.Index()) + } case key.Matches(msg, ViewportKeyMap.Quit): return m, tea.Quit @@ -132,15 +132,22 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, tea.Batch(cmds...) } -func isOutOfBounds(i int, l int, m *model) bool { - index := l - 1 +func isPrevOutOfBounds(i int, m *model) bool { + if len(m.list.Items()) == 0 { + return true + } + return i < 0 +} + +func isNextOutOfBounds(i int, l int, m *model) bool { + maxIndex := l - 1 // when autoread and don't show read the first opened item doesn't exist in list - if m.commands.config.AutoRead && !m.commands.config.ShowRead { - index = l + if m.commands.config.AutoRead && !m.commands.config.ShowRead && i == 0 { + maxIndex = l } - if i < 0 || i > index || index < 0 || l == 0 { + if i < 0 || i > maxIndex || maxIndex < 0 || l == 0 { return true } return false @@ -164,10 +171,15 @@ func getNextIndex(m *model) int { } func getPrevIndex(m *model) int { - if m.commands.config.AutoRead && !m.commands.config.ShowRead { + current := m.list.Index() + if m.commands.config.AutoRead && !m.commands.config.ShowRead && current < len(m.list.Items()) { return m.list.Index() } + if current == 0 { + return 0 + } + return m.list.Index() - 1 } From 1b4ad9713643bacc236fad48a6dcd5a6e8146076 Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 19:25:47 -0600 Subject: [PATCH 05/11] fix: missing nil check --- internal/commands/list.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/commands/list.go b/internal/commands/list.go index 9746d07..9baf8ab 100644 --- a/internal/commands/list.go +++ b/internal/commands/list.go @@ -220,7 +220,12 @@ func updateList(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, m.list.NewStatusMessage("No items to favourite.") } - current := m.list.SelectedItem().(TUIItem) + item := m.list.SelectedItem() + if item == nil { + return m, m.list.NewStatusMessage("No item selected.") + } + + current := item.(TUIItem) err := m.commands.store.ToggleFavourite(current.ID) if err != nil { return m, tea.Quit From e770c6150faa1d89b7e3ef6b0cdd1e35e40d3add Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sat, 4 Jan 2025 19:28:28 -0600 Subject: [PATCH 06/11] fix: missing nil check on list read --- internal/commands/list.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/commands/list.go b/internal/commands/list.go index 9baf8ab..967e7c3 100644 --- a/internal/commands/list.go +++ b/internal/commands/list.go @@ -188,7 +188,12 @@ func updateList(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, m.list.NewStatusMessage("No items to mark.") } - current := m.list.SelectedItem().(TUIItem) + item := m.list.SelectedItem() + if item == nil { + return m, m.list.NewStatusMessage("No item selected.") + } + + current := item.(TUIItem) err := m.commands.store.ToggleRead(current.ID) if err != nil { return m, tea.Quit From 2b94370ae4d32085ab735a15ed24410fee3b058a Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Sun, 5 Jan 2025 18:37:06 -0600 Subject: [PATCH 07/11] tweak: fix cursor upon read/quit on last post, toggle read on same post, and added read indication to post view --- internal/commands/commands.go | 8 +++++++- internal/commands/tui.go | 2 ++ internal/commands/viewport.go | 30 +++++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 7fdcd6f..eb84a40 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -291,7 +291,13 @@ func getStyleConfigWithOverrides(theme config.Theme) (sc ansi.StyleConfig) { func glamouriseItem(item store.Item, theme config.Theme) (string, error) { var mdown string - mdown += "# " + item.Title + title := item.Title + // check mark indication post has been read + if item.Read() { + title = fmt.Sprintf("\u2713 - %s", item.Title) + } + + mdown += "# " + title mdown += "\n" mdown += item.Author if !item.PublishedAt.IsZero() { diff --git a/internal/commands/tui.go b/internal/commands/tui.go index a01480e..3d0c013 100644 --- a/internal/commands/tui.go +++ b/internal/commands/tui.go @@ -42,6 +42,8 @@ type model struct { list list.Model help help.Model viewport viewport.Model + lastRead *list.Item + lastReadIndex int } func (m model) Init() tea.Cmd { diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index f725baa..8af46ec 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -29,6 +29,13 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { m.viewport.GotoBottom() case key.Matches(msg, ViewportKeyMap.Escape): + // reset cursor if last post is read and quit + index := m.list.Index() + length := len(m.list.Items()) + if index >= length && length >= 1 { + m.list.Select(index - 1) + } + m.selectedArticle = nil cmds = append(cmds, m.UpdateList()) @@ -66,9 +73,30 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } if !m.commands.config.ShowRead { - m.list.RemoveItem(m.list.Index()) + index := m.list.Index() + + if m.lastRead != nil && current.ID == (*m.lastRead).(TUIItem).ID { + // un-read re-add post back to list + m.list.InsertItem(index, *m.lastRead) + m.lastReadIndex = index + m.lastRead = nil + } else { + // remove post and store backup for un-read + items := m.list.Items() + item := items[index] + m.list.RemoveItem(index) + m.lastReadIndex = index + m.lastRead = &item + } } + // trigger refresh to update read indication + content, err := m.commands.GetGlamourisedArticle(*m.selectedArticle) + if err != nil { + return m, tea.Quit + } + m.viewport.SetContent(content) + case key.Matches(msg, ViewportKeyMap.Prev): navIndex := getPrevIndex(&m) items := m.list.Items() From 7772d607a2aa518f348b7cef065408dd0c98a7bd Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Mon, 6 Jan 2025 07:09:41 -0600 Subject: [PATCH 08/11] fix: addres pr feedback for methods --- internal/commands/viewport.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/commands/viewport.go b/internal/commands/viewport.go index 8af46ec..3e6e045 100644 --- a/internal/commands/viewport.go +++ b/internal/commands/viewport.go @@ -98,9 +98,9 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { m.viewport.SetContent(content) case key.Matches(msg, ViewportKeyMap.Prev): - navIndex := getPrevIndex(&m) + navIndex := m.getPrevIndex() items := m.list.Items() - if isPrevOutOfBounds(navIndex, &m) { + if m.isPrevOutOfBounds(navIndex) { return m, nil } @@ -120,9 +120,9 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { } case key.Matches(msg, ViewportKeyMap.Next): - navIndex := getNextIndex(&m) + navIndex := m.getNextIndex() items := m.list.Items() - if isNextOutOfBounds(navIndex, len(items), &m) { + if m.isNextOutOfBounds(navIndex, len(items)) { return m, nil } @@ -160,14 +160,14 @@ func updateViewport(msg tea.Msg, m model) (tea.Model, tea.Cmd) { return m, tea.Batch(cmds...) } -func isPrevOutOfBounds(i int, m *model) bool { +func (m *model) isPrevOutOfBounds(i int) bool { if len(m.list.Items()) == 0 { return true } return i < 0 } -func isNextOutOfBounds(i int, l int, m *model) bool { +func (m *model) isNextOutOfBounds(i int, l int) bool { maxIndex := l - 1 // when autoread and don't show read the first opened item doesn't exist in list @@ -181,7 +181,7 @@ func isNextOutOfBounds(i int, l int, m *model) bool { return false } -func getNextIndex(m *model) int { +func (m *model) getNextIndex() int { if m.commands.config.AutoRead && !m.commands.config.ShowRead { return m.list.Index() } @@ -198,7 +198,7 @@ func getNextIndex(m *model) int { return m.list.Index() + 1 } -func getPrevIndex(m *model) int { +func (m *model) getPrevIndex() int { current := m.list.Index() if m.commands.config.AutoRead && !m.commands.config.ShowRead && current < len(m.list.Items()) { return m.list.Index() From 358fd603bae3957a9d653f822991af30e2358a0e Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Mon, 6 Jan 2025 07:20:00 -0600 Subject: [PATCH 09/11] fix: addres pr feedback for read icon --- internal/commands/commands.go | 3 +-- internal/config/config.go | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/commands/commands.go b/internal/commands/commands.go index eb84a40..a7fc0c9 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -292,9 +292,8 @@ func glamouriseItem(item store.Item, theme config.Theme) (string, error) { var mdown string title := item.Title - // check mark indication post has been read if item.Read() { - title = fmt.Sprintf("\u2713 - %s", item.Title) + title = fmt.Sprintf("%s - %s", item.Title, theme.ReadIcon) } mdown += "# " + title diff --git a/internal/config/config.go b/internal/config/config.go index 757a68e..5f4cb09 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -48,6 +48,7 @@ type Theme struct { TitleColor string `yaml:"titleColor,omitempty"` FilterColor string `yaml:"filterColor,omitempty"` SelectedItemColor string `yaml:"selectedItemColor,omitempty"` + ReadIcon string `yaml:"readIcon,omitempty"` } // need to add to Load() below if loading from config file @@ -111,6 +112,7 @@ func New(configPath string, pager string, previewFeeds []string, version string) SelectedItemColor: "170", TitleColor: "62", FilterColor: "62", + ReadIcon: "\u2713", }, Ordering: constants.DefaultOrdering, HTTPOptions: &HTTPOptions{ @@ -157,6 +159,10 @@ func (c *Config) Load() error { c.Ordering = fileConfig.Ordering } + if len(fileConfig.Theme.ReadIcon) > 0 { + c.Theme.ReadIcon = fileConfig.Theme.ReadIcon + } + if fileConfig.Theme.Glamour != "" { c.Theme.Glamour = fileConfig.Theme.Glamour } From 89053a47b483ddb40621e6a510df2f1a3bec37f3 Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Mon, 6 Jan 2025 16:52:50 -0600 Subject: [PATCH 10/11] fix: revert favorite within post back to --- internal/commands/key.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/commands/key.go b/internal/commands/key.go index 577b80d..9697e35 100644 --- a/internal/commands/key.go +++ b/internal/commands/key.go @@ -143,8 +143,8 @@ var ViewportKeyMap = ViewportKeyMapT{ key.WithHelp("o", "open in browser"), ), Favourite: key.NewBinding( - key.WithKeys("F"), - key.WithHelp("F", "favourite"), + key.WithKeys("f"), + key.WithHelp("f", "favourite"), ), Read: key.NewBinding( key.WithKeys("m"), @@ -173,7 +173,7 @@ func (k ViewportKeyMapT) FullHelp() [][]key.Binding { v := viewport.DefaultKeyMap() return [][]key.Binding{ {v.Up, v.Down, v.HalfPageUp, v.HalfPageDown}, - {k.GotoStart, k.GotoEnd, v.PageUp, v.PageDown}, + {k.GotoStart, k.GotoEnd}, {k.Next, k.Prev, k.OpenInBrowser, k.Favourite, k.Read}, {k.Escape, k.Quit, k.CloseFullHelp}, } From 06da920078b496ce0a1cf4cd021a8d9af0b6f76e Mon Sep 17 00:00:00 2001 From: coolsloth55 Date: Mon, 6 Jan 2025 16:57:49 -0600 Subject: [PATCH 11/11] fix: removed help menu keys on accident --- internal/commands/key.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/commands/key.go b/internal/commands/key.go index 9697e35..6d8468d 100644 --- a/internal/commands/key.go +++ b/internal/commands/key.go @@ -173,7 +173,7 @@ func (k ViewportKeyMapT) FullHelp() [][]key.Binding { v := viewport.DefaultKeyMap() return [][]key.Binding{ {v.Up, v.Down, v.HalfPageUp, v.HalfPageDown}, - {k.GotoStart, k.GotoEnd}, + {k.GotoStart, k.GotoEnd, v.PageUp, v.PageDown}, {k.Next, k.Prev, k.OpenInBrowser, k.Favourite, k.Read}, {k.Escape, k.Quit, k.CloseFullHelp}, }