From 2780add3f90c284cbb08f2b3a2ad83aeb472d4e0 Mon Sep 17 00:00:00 2001 From: wrmr Date: Sat, 9 Nov 2024 02:21:17 -0500 Subject: print url to stderr not stdout, and for normal nav as well as links --- nav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav.c b/nav.c index 8a520ac..7d5af9e 100644 --- a/nav.c +++ b/nav.c @@ -101,6 +101,7 @@ int nav_to(struct nav_state *ns, const char *url) { enum doc_type doct; struct addr adr; str_t buf; + perr(url); if (net_addr(url, &adr, ns->prot_default)) { return -1; } @@ -123,7 +124,6 @@ int nav_link_nr(struct nav_state *ns, unsigned long link_nr) { struct doc *d = &ns->histv[ns->cur_doc]; const char *url = doc_get_link(d, link_nr); if (url) { - puts(url); return nav_to(ns, url); } else { perr("invalid link number"); -- cgit 1.4.1-2-gfad0