From cf87383e3eef87fa5044f5abe5078ca221b06815 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 4 Jan 2021 15:39:29 +0100
Subject: [PATCH 08/11] prompt: suppress the ">" character always when exactly
 at the right edge

When the tail of the answer still fits exactly on the screen, the ">"
continuation character should not be shown -- also when the start of
the answer is "scrolled off" to the left.

This fixes https://savannah.gnu.org/bugs/?59816.

Bug existed in this form since version 4.0, commit 56181896.
---
 src/prompt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/prompt.c b/src/prompt.c
index 883d85b3..d092c707 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -402,7 +402,7 @@ void draw_the_promptbar(void)
 	waddstr(bottomwin, expanded);
 	free(expanded);
 
-	if (base + breadth(answer) != COLS && the_page < end_page)
+	if (the_page < end_page && base + breadth(answer) - the_page > COLS)
 		mvwaddch(bottomwin, 0, COLS - 1, '>');
 
 	wattroff(bottomwin, interface_color_pair[TITLE_BAR]);
-- 
2.29.2

