code: def on_resize(self, *args):
          
          # pylint: disable=W0613
          #         Unused argument 'args'
          self.screen.style.name_len = min(self.screen.style.name_len,
                                           self.term.width - 15)
          assert self.term.width >= self.screen.hint_width, (
              'Screen to small {}, must be at least {}'.format(
                  self.term.width, self.screen.hint_width))
          self._set_lastpage()
          self.dirty = self.STATE_REFRESH
docs: Signal handler callback for SIGWINCH.