From 66986591490404d12c289ad7a2198110a5faa923 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 14 May 2016 21:49:19 +0200
Subject: [PATCH] screen: displaying the cursor position should not suppress it
 next time

Take the side effect of a 'statusbar' call -- setting suppress_cursorpos
to TRUE -- into account.  This effect was overlooked by commit 9d6d5b6.
---
 src/winio.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index 549a087f..f9b88280 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3059,10 +3059,9 @@ void do_cursorpos(bool constant)
     openfile->current->next = f;
 
     /* If the position needs to be suppressed, don't suppress it next time. */
-    if (suppress_cursorpos) {
+    if (suppress_cursorpos && constant) {
 	suppress_cursorpos = FALSE;
-	if (constant)
-	    return;
+	return;
     }
 
     /* Display the current cursor position on the statusbar. */
@@ -3076,6 +3075,9 @@ void do_cursorpos(bool constant)
 	(long)openfile->filebot->lineno, linepct,
 	(unsigned long)cur_xpt, (unsigned long)cur_lenpt, colpct,
 	(unsigned long)i, (unsigned long)openfile->totsize, charpct);
+
+    /* Displaying the cursor position should not suppress it next time. */
+    suppress_cursorpos = FALSE;
 }
 
 /* Unconditionally display the current cursor position. */
-- 
GitLab