about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-13 22:40:45 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-13 22:42:35 +0100
commit9eb4018ec9972af70e44c136242715ce8956d750 (patch)
tree42d0b2992a2f5daee73449178698ea3c93a39724 /src
parente39d3765a7add4adb972e5af49d16c483160fc4c (diff)
downloadchawan-9eb4018ec9972af70e44c136242715ce8956d750.tar.gz
pager: use loadinfo for redirection message, not alert
alert has a tendency to pile up redirection infos. This is annoying and
may obscure the "too many redirections" error message.
Diffstat (limited to 'src')
-rw-r--r--src/local/pager.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 984b3ec5..de80b9b6 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -1372,9 +1372,10 @@ proc checkMailcap(pager: Pager; container: Container; stream: SocketStream;
   return CheckMailcapResult(connect: false, fdout: -1)
 
 proc redirectTo(pager: Pager; container: Container; request: Request) =
-  pager.alert("Redirecting to " & $request.url)
   pager.gotoURL(request, some(container.url), replace = container,
     redirectdepth = container.redirectdepth + 1, referrer = container)
+  pager.container.loadinfo = "Redirecting to " & $request.url
+  pager.onSetLoadInfo(pager.container)
   dec pager.numload
 
 proc fail(pager: Pager; container: Container; errorMessage: string) =