mercurial/crecord.py
changeset 41993 cde5827d09a7
parent 41992 fa3b0ca9d74f
child 42025 66fc05ff0ea3
--- a/mercurial/crecord.py	Wed Mar 13 18:39:45 2019 -0700
+++ b/mercurial/crecord.py	Wed Mar 13 20:09:56 2019 -0700
@@ -1764,6 +1764,12 @@
         except curses.error:
             self.usecolor = False
 
+        # In some situations we may have some cruft left on the "alternate
+        # screen" from another program (or previous iterations of ourself), and
+        # we won't clear it if the scroll region is small enough to comfortably
+        # fit on the terminal.
+        self.stdscr.clear()
+
         # available colors: black, blue, cyan, green, magenta, white, yellow
         # init_pair(color_id, foreground_color, background_color)
         self.initcolorpair(None, None, name="normal")