Patchwork D6131: crecord: redraw the screen when starting up chunkselector

login
register
mail settings
Submitter phabricator
Date March 20, 2019, 6:08 p.m.
Message ID <2459ebcb91f3962627c64bbe3430dbd9@localhost.localdomain>
Download mbox | patch
Permalink /patch/39347/
State Not Applicable
Headers show

Comments

phabricator - March 20, 2019, 6:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcde5827d09a7: crecord: redraw the screen when starting up chunkselector (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6131?vs=14491&id=14573

REVISION DETAIL
  https://phab.mercurial-scm.org/D6131

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: martinvonz, mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -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")