foreseen

A text-based gemini browser with prefetching.
git clone git://git.laack.co/foreseen.git
Log | Files | Refs | README | LICENSE

commit 9db57a3faa9f8185414cfb37130212f6b899c73b
parent 10c272096fba3c4e29385ec8c79f7f6909260784
Author: Andrew Laack <andrew@laack.co>
Date:   Sun, 27 Sep 2026 12:41:02 -0500

Added comment to explain weirdness

Diffstat:
Msrc/browser.cpp | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/browser.cpp b/src/browser.cpp @@ -327,6 +327,15 @@ void Browser::followLinkNumber(int linkToFollow) { void Browser::goBack() { int original = previousIdx; + + // we track this because sometimes sites do this: + // start site + // input something + // redirect back to start site + // and in such cases, I'd expect back and forward to treat the same site as one site, + // but only in cases where they are right next to each other without any other 2X status code sites + // between them. + std::string starting = getCurrentLink()->getLinkDestination().to_string(); previousIdx -= 1;