equal
deleted
inserted
replaced
598 try to select the previous item to the current item that has the |
598 try to select the previous item to the current item that has the |
599 most-indented level. for example, if a hunk is selected, try to select |
599 most-indented level. for example, if a hunk is selected, try to select |
600 the last hunkline of the hunk prior to the selected hunk. or, if |
600 the last hunkline of the hunk prior to the selected hunk. or, if |
601 the first hunkline of a hunk is currently selected, then select the |
601 the first hunkline of a hunk is currently selected, then select the |
602 hunk itself. |
602 hunk itself. |
603 |
|
604 if the currently selected item is already at the top of the screen, |
|
605 scroll the screen down to show the new-selected item. |
|
606 """ |
603 """ |
607 currentitem = self.currentselecteditem |
604 currentitem = self.currentselecteditem |
608 |
605 |
609 nextitem = currentitem.previtem(constrainlevel=False) |
606 nextitem = currentitem.previtem(constrainlevel=False) |
610 |
607 |
618 def uparrowshiftevent(self): |
615 def uparrowshiftevent(self): |
619 """ |
616 """ |
620 select (if possible) the previous item on the same level as the |
617 select (if possible) the previous item on the same level as the |
621 currently selected item. otherwise, select (if possible) the |
618 currently selected item. otherwise, select (if possible) the |
622 parent-item of the currently selected item. |
619 parent-item of the currently selected item. |
623 |
|
624 if the currently selected item is already at the top of the screen, |
|
625 scroll the screen down to show the new-selected item. |
|
626 """ |
620 """ |
627 currentitem = self.currentselecteditem |
621 currentitem = self.currentselecteditem |
628 nextitem = currentitem.previtem() |
622 nextitem = currentitem.previtem() |
629 # if there's no previous item on this level, try choosing the parent |
623 # if there's no previous item on this level, try choosing the parent |
630 if nextitem is None: |
624 if nextitem is None: |
641 try to select the next item to the current item that has the |
635 try to select the next item to the current item that has the |
642 most-indented level. for example, if a hunk is selected, select |
636 most-indented level. for example, if a hunk is selected, select |
643 the first hunkline of the selected hunk. or, if the last hunkline of |
637 the first hunkline of the selected hunk. or, if the last hunkline of |
644 a hunk is currently selected, then select the next hunk, if one exists, |
638 a hunk is currently selected, then select the next hunk, if one exists, |
645 or if not, the next header if one exists. |
639 or if not, the next header if one exists. |
646 |
|
647 if the currently selected item is already at the bottom of the screen, |
|
648 scroll the screen up to show the new-selected item. |
|
649 """ |
640 """ |
650 #self.startprintline += 1 #debug |
641 #self.startprintline += 1 #debug |
651 currentitem = self.currentselecteditem |
642 currentitem = self.currentselecteditem |
652 |
643 |
653 nextitem = currentitem.nextitem(constrainlevel=False) |
644 nextitem = currentitem.nextitem(constrainlevel=False) |