def save_cursor_position(self, mode=None):
"""
Saves the cursor position and current rendition settings to
:attr:`self.saved_cursorX`, :attr:`self.saved_cursorY`, and
:attr:`self.saved_rendition`
.. note:: Also handles the set/restore "Private Mode Settings" sequence.
"""
if mode: # Set DEC private mode
# TODO: Need some logic here to save the current expanded mode
# so we can restore it in _set_top_bottom().
self.set_expanded_mode(mode)
# NOTE: args and kwargs are here to make sure we don't get an exception
# when we're called via escape sequences.
self.saved_cursorX = self.cursorX
self.saved_cursorY = self.cursorY
self.saved_rendition = self.cur_rendition
评论列表
文章目录