Mercurial > hg
changeset 42572:cd4f1b7c3192
crecord: make KEY_ENTER usable in tests (by not updating UI)
Differential Revision: https://phab.mercurial-scm.org/D6620
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Mon, 08 Jul 2019 13:06:46 -0700 |
parents | 3be6ff55095b |
children | 9ac1a5a4a64f |
files | mercurial/crecord.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/crecord.py Mon Jul 08 12:38:37 2019 -0700 +++ b/mercurial/crecord.py Mon Jul 08 13:06:46 2019 -0700 @@ -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']: