#NEWLINE# def has_selections( self ) : #NEWLINE# #INDENT# 'Check if view has a valid selection.' #NEWLINE# selections = False #NEWLINE# if bool ( load_settings ( ) . get ( 'multi_select' , False ) ) : #NEWLINE# #INDENT# for s in self . view . sel ( ) : #NEWLINE# #INDENT# if ( s . size ( ) > 0 ) : #NEWLINE# #INDENT# selections = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# selections = ( ( len ( self . view . sel ( ) ) == 1 ) and ( self . view . sel ( ) [ 0 ] . size ( ) > 0 ) ) #NEWLINE# #UNINDENT# return selections