Patchwork crecord: fix blue artifact bug coming back from help screen

login
register
mail settings
Submitter Laurent Charignon
Date June 3, 2015, 9:23 p.m.
Message ID <79f87d3091d614fdfc02.1433366628@lcharignon-mbp.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/9468/
State Accepted
Headers show

Comments

Laurent Charignon - June 3, 2015, 9:23 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1433366541 25200
#      Wed Jun 03 14:22:21 2015 -0700
# Node ID 79f87d3091d614fdfc028e2071de4752109d40f4
# Parent  6084926366b979e81e5dcc84fa595965d4c07883
crecord: fix blue artifact bug coming back from help screen

Before this patch, with record's curses interface:
- When one pressed the ? key to see the help menu and then leaves the help menu
- Then, blue artifacts would remain on the screen

This patch forces a screen clear / refresh after coming back from the help menu.
Since we don't have UI test for crecord I checked on my machine that the bug
does not reproduce.
Matt Mackall - June 3, 2015, 10:10 p.m.
On Wed, 2015-06-03 at 14:23 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1433366541 25200
> #      Wed Jun 03 14:22:21 2015 -0700
> # Node ID 79f87d3091d614fdfc028e2071de4752109d40f4
> # Parent  6084926366b979e81e5dcc84fa595965d4c07883
> crecord: fix blue artifact bug coming back from help screen

Queued for default, thanks.

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1554,6 +1554,8 @@ 
             self.togglefolded(foldparent=True)
         elif keypressed in ["?"]:
             self.helpwindow()
+            self.stdscr.clear()
+            self.stdscr.refresh()
 
     def main(self, stdscr):
         """