(self, bfr, sel)
Find bracket matches
Find bracket matches
Find bracket matches
def find_matches(self, bfr, sel):
        """
        Find bracket matches
        """

        bracket = None
        left, right = self.match_brackets(bfr, self.search_window, sel)

        regions = [sublime.Region(sel.a, sel.b)]

        if left is not None and right is not None:
            bracket = self.brackets[left.type]
            left, right, regions, _ = self.run_plugin(bracket.name, left, right, regions)

        # Matched brackets
        if left is not None and right is not None and bracket is not None:
            self.save_regions(left, right, regions)

        # Unmatched brackets
        elif (left is not None or right is not None) and self.show_unmatched:
            self.save_incomplete_regions(left, right, regions)

        else:
            self.store_sel(regions)
def find_matches ( self , bfr , sel ) : bracket = None left , right = self . match_brackets ( bfr , self . search_window , sel ) regions = [ sublime . Region ( sel . a , sel . b ) ] if left is not None and right is not None : bracket = self . brackets [ left . type ] left , right , regions , _ = self . run_plugin ( bracket . name , left , right , regions ) # Matched brackets if left is not None and right is not None and bracket is not None : self . save_regions ( left , right , regions ) # Unmatched brackets elif ( left is not None or right is not None ) and self . show_unmatched : self . save_incomplete_regions ( left , right , regions ) else : self . store_sel ( regions )