#NEWLINE# def __getitem__( self , name ) : #NEWLINE# #INDENT# ' Override __getitem__ to make lookup of pane- buffers dynamic. ' #NEWLINE# if name . startswith ( 'pane-' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# id = int ( id [ len ( 'pane-' ) : ] ) #NEWLINE# return self . pymux . panes_by_id [ id ] . scroll_buffer #NEWLINE# #UNINDENT# except ( ValueError , KeyError ) : #NEWLINE# #INDENT# raise KeyError #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if name . startswith ( 'search-' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# id = int ( name [ len ( 'search-' ) : ] ) #NEWLINE# return self . pymux . panes_by_id [ id ] . search_buffer #NEWLINE# #UNINDENT# except ( ValueError , KeyError ) : #NEWLINE# #INDENT# raise KeyError #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return super ( _BufferMapping , self ) . __getitem__ ( name )