#NEWLINE# def expand_to_line( view , region ) : #NEWLINE# #INDENT# "\n    As view.full_line, but doesn't expand to the next line if a full line is\n    already selected\n    " #NEWLINE# if ( ( not ( region . a == region . b ) ) and ( view . substr ( ( region . end ( ) - 1 ) ) == '\n' ) ) : #NEWLINE# #INDENT# return sublime . Region ( view . line ( region ) . begin ( ) , region . end ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return view . full_line ( region )