Loading cccli/tagdisplay.py +8 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,14 @@ class TagDisplay(object): def color(self, tagname): '''Return the current tag color''' if tagname in self.tagcolor and self.tagcolor[tagname] in color: return color[self.tagcolor[tagname]] tagname = unicode(tagname) # build list of matching pattern with tagname l = [ x for x in self.tagcolor if fnmatch.fnmatch(tagname, x) ] if len(l) > 0: # select longest match tm = max(l) if self.tagcolor[tm] in color: return color[self.tagcolor[tm]] return color["yellow"] def resolve(self, tagname, tagvalue): Loading Loading
cccli/tagdisplay.py +8 −2 Original line number Diff line number Diff line Loading @@ -50,8 +50,14 @@ class TagDisplay(object): def color(self, tagname): '''Return the current tag color''' if tagname in self.tagcolor and self.tagcolor[tagname] in color: return color[self.tagcolor[tagname]] tagname = unicode(tagname) # build list of matching pattern with tagname l = [ x for x in self.tagcolor if fnmatch.fnmatch(tagname, x) ] if len(l) > 0: # select longest match tm = max(l) if self.tagcolor[tm] in color: return color[self.tagcolor[tm]] return color["yellow"] def resolve(self, tagname, tagvalue): Loading