D6620: crecord: make KEY_ENTER usable in tests (by not updating UI)
spectral (Kyle Lippincott)
phabricator at mercurial-scm.org
Mon Jul 8 20:29:04 UTC 2019
spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6620
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
@@ -723,7 +723,7 @@
self.currentselecteditem = nextitem
self.recenterdisplayedarea()
- def nextsametype(self):
+ def nextsametype(self, test=False):
currentitem = self.currentselecteditem
sametype = lambda item: isinstance(item, type(currentitem))
nextitem = currentitem.nextitem()
@@ -739,7 +739,8 @@
self.togglefolded(parent)
self.currentselecteditem = nextitem
- self.recenterdisplayedarea()
+ if not test:
+ self.recenterdisplayedarea()
def rightarrowevent(self):
"""
@@ -1753,7 +1754,7 @@
self.toggleapply()
elif keypressed in ['\n', 'KEY_ENTER']:
self.toggleapply()
- self.nextsametype()
+ self.nextsametype(test=test)
elif keypressed in ['A']:
self.toggleall()
elif keypressed in ['e']:
To: spectral, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list