#NEWLINE# def find( self , pattern , flags ) : #NEWLINE# #INDENT# file_size = self . view . size ( ) #NEWLINE# threshold = global_settings ( 'preview_file_size_threshold' , 10 ) #NEWLINE# if ( file_size > ( ( 1024 * 1024 ) * threshold ) ) : #NEWLINE# #INDENT# print ( 'threshold reached' , threshold , 'MB' ) #NEWLINE# return self . find_in_region ( pattern , flags , self . get_visible_region ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . find_in_region ( pattern , flags , sublime . Region ( 0 , file_size ) )