#NEWLINE# def search( view , what , start_line = None , flags = 0 ) : #NEWLINE# #INDENT# if start_line : #NEWLINE# #INDENT# start = view . text_point ( start_line , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# start = view . sel ( ) [ 0 ] . begin ( ) #NEWLINE# #UNINDENT# reg = view . find ( what , start , flags ) #NEWLINE# if ( not ( reg is None ) ) : #NEWLINE# #INDENT# row = ( view . rowcol ( reg . begin ( ) ) [ 0 ] + 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# row = calculate_relative_ref ( view , '.' , start_line = start_line ) #NEWLINE# #UNINDENT# return row