Patchwork D6129: crecord: completely redraw screen when coming back from editor

login
register
mail settings
Submitter phabricator
Date March 20, 2019, 6:08 p.m.
Message ID <f5cd210242240681cd0f8494f1162c4b@localhost.localdomain>
Download mbox | patch
Permalink /patch/39346/
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 rHG3f467db023a2: crecord: completely redraw screen when coming back from editor (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6129?vs=14488&id=14571

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

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -554,6 +554,14 @@ 
     of the chosen chunks.
     """
     chunkselector = curseschunkselector(headerlist, ui, operation)
+
+    class dummystdscr(object):
+        def clear(self):
+            pass
+        def refresh(self):
+            pass
+
+    chunkselector.stdscr = dummystdscr()
     if testfn and os.path.exists(testfn):
         testf = open(testfn, 'rb')
         testcommands = [x.rstrip('\n') for x in testf.readlines()]
@@ -1606,6 +1614,9 @@ 
             except error.Abort as exc:
                 self.errorstr = str(exc)
                 return None
+            finally:
+                self.stdscr.clear()
+                self.stdscr.refresh()
 
             # remove comment lines
             patch = [line + '\n' for line in patch.splitlines()