diff --git a/CHANGELOG.md b/CHANGELOG.md index b0f10e2..97df23e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Added -- Support numpad enter key (#123) - ### Changed - Updated [go-gemini](https://github.com/makeworld-the-better-one/go-gemini) to v0.9.1 to support CN-only wildcard certs - Preformatted text is now light yellow by default diff --git a/THANKS.md b/THANKS.md index bfe147c..0e093f4 100644 --- a/THANKS.md +++ b/THANKS.md @@ -10,5 +10,4 @@ Thank you to the following contributors, who have helped make Amfora great. FOSS - Timur Ismagilov (@bouncepaw) - Matt Caroll (@ohiolab) - Patryk Niedźwiedziński (@pniedzwiedzinski) -- Trevor Slocum (@tsclocum) -- Cole Helbling (@cole-h) +- Trevor Slocum (@tsclocum) \ No newline at end of file diff --git a/display/display.go b/display/display.go index 4ccb5e4..d2b6921 100644 --- a/display/display.go +++ b/display/display.go @@ -115,7 +115,7 @@ func Init() { //nolint:exhaustive switch key { - case tcell.KeyEnter, KeyNumpadEnter: + case tcell.KeyEnter: // Figure out whether it's a URL, link number, or search // And send out a request diff --git a/display/help.go b/display/help.go index 224adf2..1391a07 100644 --- a/display/help.go +++ b/display/help.go @@ -63,7 +63,7 @@ func Help() { func helpInit() { // Populate help table helpTable.SetDoneFunc(func(key tcell.Key) { - if key == tcell.KeyEsc || key == tcell.KeyEnter || key == KeyNumpadEnter { + if key == tcell.KeyEsc || key == tcell.KeyEnter { tabPages.SwitchToPage(strconv.Itoa(curTab)) App.SetFocus(tabs[curTab].view) App.Draw() diff --git a/display/tab.go b/display/tab.go index 28d1d6c..f192720 100644 --- a/display/tab.go +++ b/display/tab.go @@ -76,7 +76,7 @@ func makeNewTab() *tab { currentSelection := tabs[tab].view.GetHighlights() numSelections := len(tabs[tab].page.Links) - if (key == tcell.KeyEnter || key == KeyNumpadEnter) && len(currentSelection) > 0 { + if key == tcell.KeyEnter && len(currentSelection) > 0 { // A link is selected and enter was pressed: "click" it and load the page it's for bottomBar.SetLabel("") linkN, _ := strconv.Atoi(currentSelection[0]) @@ -85,7 +85,7 @@ func makeNewTab() *tab { followLink(tabs[tab], tabs[tab].page.URL, tabs[tab].page.Links[linkN]) return } - if len(currentSelection) == 0 && (key == tcell.KeyEnter || key == KeyNumpadEnter || key == tcell.KeyTab) { + if len(currentSelection) == 0 && (key == tcell.KeyEnter || key == tcell.KeyTab) { // They've started link highlighting tabs[tab].page.Mode = structs.ModeLinkSelect diff --git a/display/util.go b/display/util.go index 3de9b16..4ea8e91 100644 --- a/display/util.go +++ b/display/util.go @@ -5,15 +5,12 @@ import ( "net/url" "strings" - "github.com/gdamore/tcell" "github.com/spf13/viper" "gitlab.com/tslocum/cview" ) // This file contains funcs that are small, self-contained utilities. -const KeyNumpadEnter = tcell.KeyCtrlJ - // escapeMeta santizes a META string for use within a cview modal. func escapeMeta(meta string) string { return cview.Escape(strings.ReplaceAll(meta, "\n", ""))