#NEWLINE# def hlstyle( self , fg = None , bg = None , attrs = None ) : #NEWLINE# #INDENT# 'Highlight a segment.' #NEWLINE# if ( ( not attrs ) and ( not bg ) and ( not fg ) ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# tmux_attrs = [ ] #NEWLINE# if ( fg is not None ) : #NEWLINE# #INDENT# if ( ( fg is False ) or ( fg [ 0 ] is False ) ) : #NEWLINE# #INDENT# tmux_attrs += [ 'fg=default' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tmux_attrs += [ ( 'fg=colour' + str ( fg [ 0 ] ) ) ] #NEWLINE# #UNINDENT# #UNINDENT# if ( bg is not None ) : #NEWLINE# #INDENT# if ( ( bg is False ) or ( bg [ 0 ] is False ) ) : #NEWLINE# #INDENT# tmux_attrs += [ 'bg=default' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# tmux_attrs += [ ( 'bg=colour' + str ( bg [ 0 ] ) ) ] #NEWLINE# #UNINDENT# #UNINDENT# if ( attrs is not None ) : #NEWLINE# #INDENT# tmux_attrs += attrs_to_tmux_attrs ( attrs ) #NEWLINE# #UNINDENT# return ( ( '#[' + ',' . join ( tmux_attrs ) ) + ']' )