From 43ba408ee4a6a9efb54685b68df80b45c93c7d51 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 19 Sep 2021 13:58:51 +0200
Subject: [PATCH 22/34] display: work around a disappearing cursor when a line
 scrolled sideways

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

Problem existed since probably forever.
---
 src/winio.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/winio.c b/src/winio.c
index 71474a65..e3a8e859 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3213,6 +3213,15 @@ void edit_redraw(linestruct *old_current, update_type manner)
 						(old_current != openfile->current &&
 						get_page_start(openfile->placewewant) > 0))
 		update_line(openfile->current, openfile->current_x);
+
+#ifdef USE_SLANG
+	/* Work around a gaffe of Slang -- https://sv.gnu.org/bugs/?61186. */
+	if (get_page_start(was_pww) > 0 || get_page_start(openfile->placewewant) > 0) {
+		wrefresh(edit);
+		full_refresh();
+	}
+#endif
+
 }
 
 /* Refresh the screen without changing the position of lines.  Use this
-- 
2.29.3

