Patchwork D6130: crecord: redraw the screen on ctrl-L

login
register
mail settings
Submitter phabricator
Date March 14, 2019, 2:36 a.m.
Message ID <differential-rev-PHID-DREV-34wybazfbgeu5uwti643-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39243/
State Superseded
Headers show

Comments

phabricator - March 14, 2019, 2:36 a.m.
spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is the normal use of Ctrl-L, so I think this is going to be what most
  people expect it to do. We're keeping the adjustment of what line we're scrolled
  to as well. I believe both to be necessary to handle otherwise inescapable
  situations when we've got screen corruption or edge-cases during window
  resizing.

REPOSITORY
  rHG Mercurial

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

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
@@ -1729,8 +1729,11 @@ 
             self.stdscr.clear()
             self.stdscr.refresh()
         elif curses.unctrl(keypressed) in ["^L"]:
-            # scroll the current line to the top of the screen
+            # scroll the current line to the top of the screen, and redraw
+            # everything
             self.scrolllines(self.selecteditemstartline)
+            self.stdscr.clear()
+            self.stdscr.refresh()
 
     def main(self, stdscr):
         """