From 298034078e7b6d10ea61bbe7c0d1407789fe4f69 Mon Sep 17 00:00:00 2001 From: Jansen Price Date: Sat, 5 Sep 2020 13:04:55 -0500 Subject: [PATCH] Add 'e' keybinding feature to edit current URL --- display/display.go | 6 ++++++ display/help.go | 1 + 2 files changed, 7 insertions(+) diff --git a/display/display.go b/display/display.go index 6a4a508..0f08676 100644 --- a/display/display.go +++ b/display/display.go @@ -295,6 +295,12 @@ func Init() { // Don't save bottom bar, so that whenever you switch tabs, it's not in that mode App.SetFocus(bottomBar) return nil + case "e": + // Letter e allows to edit current URL + bottomBar.SetLabel("[::b]Edit URL: [::-]") + bottomBar.SetText(tabs[curTab].page.URL) + App.SetFocus(bottomBar) + return nil case "R": Reload() return nil diff --git a/display/help.go b/display/help.go index 35010b9..1391a07 100644 --- a/display/help.go +++ b/display/help.go @@ -25,6 +25,7 @@ spacebar|Open bar at the bottom - type a URL, link number, search term. |Typing new:N will open link number N in a new tab |instead of the current one. Numbers|Go to links 1-10 respectively. +e|Edit current URL Enter, Tab|On a page this will start link highlighting. |Press Tab and Shift-Tab to pick different links. |Press Enter again to go to one, or Esc to stop.