def _jump(self, direction: Callable[[], bool]) -> None:
        """Jump in a particular direction within the history.

        Args:
            direction: A function that jumps in the desired direction.
        """
        if direction():
            if self.history.location is not None:
                self.visit(self.history.location, remember=False)
Jump in a particular direction within the history.

        Args:
            direction: A function that jumps in the desired direction.
        
frogmouth/widgets/viewer.py