#NEWLINE# def run( self ) : #NEWLINE# #INDENT# self . logger . info ( 'Monitoring view' ) #NEWLINE# count = 0 #NEWLINE# while ( ( self . peer . role == base . HOST_ROLE ) and ( self . peer . state == base . STATE_CONNECTED ) and ( not self . shutdown ) ) : #NEWLINE# #INDENT# if ( not ( self . peer . view == None ) ) : #NEWLINE# #INDENT# sublime . set_timeout ( self . grabAndSendViewPosition , 0 ) #NEWLINE# if ( count == 10 ) : #NEWLINE# #INDENT# count = 0 #NEWLINE# sublime . set_timeout ( self . sendViewSize , 0 ) #NEWLINE# #UNINDENT# #UNINDENT# time . sleep ( 0.5 ) #NEWLINE# count += 1 #NEWLINE# #UNINDENT# self . logger . info ( 'Stopped monitoring view' )