Show More
@@ -616,9 +616,6 b" coreconfigitem('experimental', 'single-h" | |||||
616 | coreconfigitem('experimental', 'sshserver.support-v2', |
|
616 | coreconfigitem('experimental', 'sshserver.support-v2', | |
617 | default=False, |
|
617 | default=False, | |
618 | ) |
|
618 | ) | |
619 | coreconfigitem('experimental', 'spacemovesdown', |
|
|||
620 | default=False, |
|
|||
621 | ) |
|
|||
622 | coreconfigitem('experimental', 'sparse-read', |
|
619 | coreconfigitem('experimental', 'sparse-read', | |
623 | default=False, |
|
620 | default=False, | |
624 | ) |
|
621 | ) |
@@ -713,6 +713,24 b' class curseschunkselector(object):' | |||||
713 | self.currentselecteditem = nextitem |
|
713 | self.currentselecteditem = nextitem | |
714 | self.recenterdisplayedarea() |
|
714 | self.recenterdisplayedarea() | |
715 |
|
715 | |||
|
716 | def nextsametype(self): | |||
|
717 | currentitem = self.currentselecteditem | |||
|
718 | sametype = lambda item: isinstance(item, type(currentitem)) | |||
|
719 | nextitem = currentitem.nextitem() | |||
|
720 | ||||
|
721 | while nextitem is not None and not sametype(nextitem): | |||
|
722 | nextitem = nextitem.nextitem() | |||
|
723 | ||||
|
724 | if nextitem is None: | |||
|
725 | nextitem = currentitem | |||
|
726 | else: | |||
|
727 | parent = nextitem.parentitem() | |||
|
728 | if parent.folded: | |||
|
729 | self.togglefolded(parent) | |||
|
730 | ||||
|
731 | self.currentselecteditem = nextitem | |||
|
732 | self.recenterdisplayedarea() | |||
|
733 | ||||
716 | def rightarrowevent(self): |
|
734 | def rightarrowevent(self): | |
717 | """ |
|
735 | """ | |
718 | select (if possible) the first of this item's child-items. |
|
736 | select (if possible) the first of this item's child-items. | |
@@ -1027,8 +1045,8 b' class curseschunkselector(object):' | |||||
1027 | def _getstatuslinesegments(self): |
|
1045 | def _getstatuslinesegments(self): | |
1028 | """-> [str]. return segments""" |
|
1046 | """-> [str]. return segments""" | |
1029 | selected = self.currentselecteditem.applied |
|
1047 | selected = self.currentselecteditem.applied | |
1030 | spaceselect = _('space: select') |
|
1048 | spaceselect = _('space/enter: select') | |
1031 | spacedeselect = _('space: deselect') |
|
1049 | spacedeselect = _('space/enter: deselect') | |
1032 | # Format the selected label into a place as long as the longer of the |
|
1050 | # Format the selected label into a place as long as the longer of the | |
1033 | # two possible labels. This may vary by language. |
|
1051 | # two possible labels. This may vary by language. | |
1034 | spacelen = max(len(spaceselect), len(spacedeselect)) |
|
1052 | spacelen = max(len(spaceselect), len(spacedeselect)) | |
@@ -1433,6 +1451,7 b' can use crecord multiple times to split ' | |||||
1433 | the following are valid keystrokes: |
|
1451 | the following are valid keystrokes: | |
1434 |
|
1452 | |||
1435 | [space] : (un-)select item ([~]/[x] = partly/fully applied) |
|
1453 | [space] : (un-)select item ([~]/[x] = partly/fully applied) | |
|
1454 | [enter] : (un-)select item and go to next item of same type | |||
1436 | A : (un-)select all items |
|
1455 | A : (un-)select all items | |
1437 | up/down-arrow [k/j] : go to previous/next unfolded item |
|
1456 | up/down-arrow [k/j] : go to previous/next unfolded item | |
1438 | pgup/pgdn [K/J] : go to previous/next item of same type |
|
1457 | pgup/pgdn [K/J] : go to previous/next item of same type | |
@@ -1686,8 +1705,9 b' are you sure you want to review/edit and' | |||||
1686 | return True |
|
1705 | return True | |
1687 | elif keypressed in [' '] or (test and keypressed in ["TOGGLE"]): |
|
1706 | elif keypressed in [' '] or (test and keypressed in ["TOGGLE"]): | |
1688 | self.toggleapply() |
|
1707 | self.toggleapply() | |
1689 | if self.ui.configbool('experimental', 'spacemovesdown'): |
|
1708 | elif keypressed in ['\n', 'KEY_ENTER']: | |
1690 |
|
|
1709 | self.toggleapply() | |
|
1710 | self.nextsametype() | |||
1691 | elif keypressed in ['A']: |
|
1711 | elif keypressed in ['A']: | |
1692 | self.toggleall() |
|
1712 | self.toggleall() | |
1693 | elif keypressed in ['e']: |
|
1713 | elif keypressed in ['e']: |
@@ -327,24 +327,6 b' reflect this edition.' | |||||
327 | hello world |
|
327 | hello world | |
328 | lower |
|
328 | lower | |
329 |
|
329 | |||
330 | Check spacemovesdown |
|
|||
331 |
|
||||
332 | $ cat <<EOF >> $HGRCPATH |
|
|||
333 | > [experimental] |
|
|||
334 | > spacemovesdown = true |
|
|||
335 | > EOF |
|
|||
336 | $ cat <<EOF >testModeCommands |
|
|||
337 | > TOGGLE |
|
|||
338 | > TOGGLE |
|
|||
339 | > X |
|
|||
340 | > EOF |
|
|||
341 | $ hg status -q |
|
|||
342 | M b |
|
|||
343 | M x |
|
|||
344 | $ hg commit -i -m "nothing to commit?" -d "0 0" |
|
|||
345 | no changes to record |
|
|||
346 | [1] |
|
|||
347 |
|
||||
348 | Check ui.interface logic for the chunkselector |
|
330 | Check ui.interface logic for the chunkselector | |
349 |
|
331 | |||
350 | The default interface is text |
|
332 | The default interface is text |
General Comments 0
You need to be logged in to leave comments.
Login now