(self, do_scroll_down)
Wrap if we need to.
Wrap if we need to.
Wrap if we need to .
def _check_wrap(self, do_scroll_down):
        """Wrap if we need to."""
        if self.current_col > self.mode.width:
            if self.current_row < self.mode.height:
                if do_scroll_down:
                    # scroll down (make space by shifting the next rows down)
                    if self.current_row < self.scroll_area.bottom:
                        self.scroll_down(self.current_row+1)
                # wrap line
                self.set_wrap(self.current_row, True)
                # move cursor and reset cursor attribute
                self._move_cursor(self.current_row + 1, 1)
            else:
                self.current_col = self.mode.width
def _check_wrap ( self , do_scroll_down ) : if self . current_col > self . mode . width : if self . current_row < self . mode . height : if do_scroll_down : # scroll down (make space by shifting the next rows down) if self . current_row < self . scroll_area . bottom : self . scroll_down ( self . current_row + 1 ) # wrap line self . set_wrap ( self . current_row , True ) # move cursor and reset cursor attribute self . _move_cursor ( self . current_row + 1 , 1 ) else : self . current_col = self . mode . width