crecord: re-center display in interactive curses commit on pageup/down
authorMatti Hamalainen <ccr@tnsp.org>
Tue, 19 Jun 2018 13:07:18 +0300
changeset 38419 96871ca32270
parent 38418 a0e185f10454
child 38420 235d0bc11e1d
crecord: re-center display in interactive curses commit on pageup/down A long-standing issue in the crecord (interactive curses commit interface) is that using PageUp/Down to move along longer-than current screen size chunks would "lose" the cursor and not properly re-center. There has been self.recenterdisplayedarea() to do that, but it has not been in use for some reason. Add calls to the appropriate uparrowshiftevent() and downarrowshiftevent() methods to fix this.
mercurial/crecord.py
--- a/mercurial/crecord.py	Fri Feb 02 14:21:04 2018 -0800
+++ b/mercurial/crecord.py	Tue Jun 19 13:07:18 2018 +0300
@@ -671,6 +671,7 @@
             nextitem = currentitem
 
         self.currentselecteditem = nextitem
+        self.recenterdisplayedarea()
 
     def downarrowevent(self):
         """
@@ -710,6 +711,7 @@
             nextitem = currentitem
 
         self.currentselecteditem = nextitem
+        self.recenterdisplayedarea()
 
     def rightarrowevent(self):
         """