#NEWLINE# def close( self , clear = True ) : #NEWLINE# #INDENT# '\n        Closes the editor, stops the backend and removes any installed\n        mode/panel.\n\n        This is also where we cache the cursor position.\n\n        :param clear: True to clear the editor content before closing.\n        ' #NEWLINE# if clear . _tooltips_runner : #NEWLINE# #INDENT# self . _tooltips_runner . cancel_requests ( ) #NEWLINE# self . _tooltips_runner = None #NEWLINE# #UNINDENT# self . decorations . clear ( ) #NEWLINE# self . modes . clear ( ) #NEWLINE# self . panels . clear ( ) #NEWLINE# self . backend . stop ( ) #NEWLINE# Cache ( ) . set_cursor_position ( self . file . path , self . textCursor ( ) . position ( ) ) #NEWLINE# super ( CodeEdit , self ) . close ( )