comparison mercurial/crecord.py @ 41992:fa3b0ca9d74f

crecord: redraw the screen on ctrl-L 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. Differential Revision: https://phab.mercurial-scm.org/D6130
author Kyle Lippincott <spectral@google.com>
date Wed, 13 Mar 2019 18:39:45 -0700
parents 3f467db023a2
children cde5827d09a7
comparison
equal deleted inserted replaced
41991:3f467db023a2 41992:fa3b0ca9d74f
1728 elif keypressed in ["?"]: 1728 elif keypressed in ["?"]:
1729 self.helpwindow() 1729 self.helpwindow()
1730 self.stdscr.clear() 1730 self.stdscr.clear()
1731 self.stdscr.refresh() 1731 self.stdscr.refresh()
1732 elif curses.unctrl(keypressed) in ["^L"]: 1732 elif curses.unctrl(keypressed) in ["^L"]:
1733 # scroll the current line to the top of the screen 1733 # scroll the current line to the top of the screen, and redraw
1734 # everything
1734 self.scrolllines(self.selecteditemstartline) 1735 self.scrolllines(self.selecteditemstartline)
1736 self.stdscr.clear()
1737 self.stdscr.refresh()
1735 1738
1736 def main(self, stdscr): 1739 def main(self, stdscr):
1737 """ 1740 """
1738 method to be wrapped by curses.wrapper() for selecting chunks. 1741 method to be wrapped by curses.wrapper() for selecting chunks.
1739 """ 1742 """