#NEWLINE# def _do_home_key( self , event = None , select = False ) : #NEWLINE# #INDENT# ' Performs home key action ' #NEWLINE# delta = ( self . textCursor ( ) . positionInBlock ( ) - TextHelper ( self ) . line_indent ( ) ) #NEWLINE# cursor = self . textCursor ( ) #NEWLINE# move = QtGui . QTextCursor . MoveAnchor #NEWLINE# if select : #NEWLINE# #INDENT# move = QtGui . QTextCursor . KeepAnchor #NEWLINE# #UNINDENT# if ( delta > 0 ) : #NEWLINE# #INDENT# cursor . movePosition ( QtGui . QTextCursor . Left , move , delta ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cursor . movePosition ( QtGui . QTextCursor . StartOfBlock , move ) #NEWLINE# #UNINDENT# self . setTextCursor ( cursor ) #NEWLINE# if event : #NEWLINE# #INDENT# event . accept ( )