From 9d29acc8e895bf0a77ec5ca65bd3b072784fb8ed Mon Sep 17 00:00:00 2001 From: asdf Date: Thu, 14 Nov 2019 21:22:17 +1100 Subject: [PATCH] Review of webmode, corrections to error messages and comments --- client.go | 3 ++- defaults.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index fa9f1ca..23f4925 100644 --- a/client.go +++ b/client.go @@ -1001,7 +1001,7 @@ func (c *client) handleWeb(u Url) { if http.IsTextFile(u.Full) { page, err := http.Visit(wm, u.Full, c.Width-1) if err != nil { - c.SetMessage(fmt.Sprintf("Lynx error: %s", err.Error()), true) + c.SetMessage(fmt.Sprintf("%s error: %s", wm, err.Error()), true) c.DrawMessage() return } @@ -1032,6 +1032,7 @@ func (c *client) handleWeb(u Url) { } else { c.SetMessage(msg, false) } + c.DrawMessage() default: c.SetMessage("Current 'webmode' setting does not allow http/https", false) c.DrawMessage() diff --git a/defaults.go b/defaults.go index c14db8c..a89e7f5 100644 --- a/defaults.go +++ b/defaults.go @@ -53,7 +53,7 @@ var defaultOptions = map[string]string{ "theme": "normal", // "normal", "inverted" "tlscertificate": "", "tlskey": "", - "webmode": "none", // "none", "gui", "lynx", "w3m" + "webmode": "none", // "none", "gui", "lynx", "w3m", "elinks" } // homePath will return the path to your home directory as a string