diff --git a/src/gmnlm.c b/src/gmnlm.c
index cbc04be66573d4980e24f00761c54d4ac8a1a88f..e80b38b6521ef0eccd5629a1f0b16d2406d8cac1 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -278,8 +278,10 @@
if (browser->pagination && row >= ws.ws_row - 4) {
char prompt[4096];
snprintf(prompt, sizeof(prompt), "\n%s at %s\n"
- "[Enter]: read more; [N]: follow Nth link; [b]ack; [f]orward; [q]uit\n"
- "(more) => ", resp->meta, browser->plain_url);
+ "[Enter]: read more; [N]: follow Nth link; %s%s[q]uit\n"
+ "(more) => ", resp->meta, browser->plain_url,
+ browser->history->prev ? "[b]ack; " : "",
+ browser->history->next ? "[f]orward; " : "");
enum prompt_result result = PROMPT_AGAIN;
while (result == PROMPT_AGAIN) {
result = do_prompts(prompt, browser);
@@ -485,10 +487,12 @@ goto next;
}
snprintf(prompt, sizeof(prompt), "\n%s at %s\n"
- "[N]: follow Nth link; [b]ack; [f]orward; [q]uit\n"
+ "[N]: follow Nth link; %s%s[q]uit\n"
"=> ",
resp.status == GEMINI_STATUS_SUCCESS ? resp.meta : "",
- browser.plain_url);
+ browser.plain_url,
+ browser.history->prev ? "[b]ack; " : "",
+ browser.history->next ? "[f]orward; " : "");
gemini_response_finish(&resp);
enum prompt_result result = PROMPT_AGAIN;