'Resets the terminal to its initial state.
* Scroll margins are reset to screen boundaries.
* Cursor is moved to home location -- ``(0, 0)`` and its
attributes are set to defaults (see :attr:`default_char`).
* Screen is cleared -- each character is reset to
:attr:`default_char`.
* Tabstops are reset to "every eight columns".
.. note::
Neither VT220 nor VT102 manuals mentioned that terminal modes
and tabstops should be reset as well, thanks to
:manpage:`xterm` -- we now know that.'

def reset(self):

    self.buffer[:] = (take(self.columns, self.default_line) for _ in range(self.lines))
    self.mode = set([mo.DECAWM, mo.DECTCEM])
    self.margins = Margins(0, (self.lines - 1))
    self.charset = 0
    self.g0_charset = cs.IBMPC_MAP
    self.g1_charset = cs.VT100_MAP
    self.tabstops = set(range(7, self.columns, 8))
    self.cursor = Cursor(0, 0)
    self.cursor_position()
