def _set_scroll_area(self, force=False):
<EOL>oldOffset = self.scroll_offset<EOL>self.scroll_offset = newOffset = max(self.counters.values()) + <NUM_LIT:1><EOL>if not self.enabled:<EOL><INDENT>return<EOL><DEDENT>if not self.process_exit:<EOL><INDENT>atexit.register(self._at_exit)<EOL>if not self.no_resize and RESIZE_SUPPORTED:<EOL><INDENT>signal.signal(signal.SIGWINCH, self._resize_handler)<EOL><DEDENT>self.process_exit = True<EOL><DEDENT>if self.set_scroll:<EOL><INDENT>term = self.term<EOL>newHeight = term.height<EOL>scrollPosition = max(<NUM_LIT:0>, newHeight - newOffset)<EOL>if force or newOffset > oldOffset or newHeight != self.height:<EOL><INDENT>self.height = newHeight<EOL>if newOffset - oldOffset > <NUM_LIT:0>:<EOL><INDENT>term.move_to(<NUM_LIT:0>, max(<NUM_LIT:0>, newHeight - oldOffset))<EOL>self.stream.write('<STR_LIT:\n>' * (newOffset - oldOffset))<EOL><DEDENT>self.term.change_scroll(scrollPosition)<EOL><DEDENT>term.move_to(<NUM_LIT:0>, scrollPosition)<EOL>if self.companion_term:<EOL><INDENT>self.companion_term.move_to(<NUM_LIT:0>, scrollPosition)<EOL><DEDENT><DEDENT>
Args:
    force(bool): Set the scroll area even if no change in height and position is detected

Sets the scroll window based on the counter positions