D6130: crecord: redraw the screen on ctrl-L

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Mar 13 22:36:08 EDT 2019


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

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):
         """



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


More information about the Mercurial-devel mailing list