@@ -93,7 +93,7 @@ def key(self, win, state):
9393 + str (to_hl ['fg' ] != None and (str (to_hl ['fg' ] or '' ) + ',' + (str (to_hl ['ctermfg' ][0 ])+ '-' + str (to_hl ['ctermfg' ][1 ])+ '-' + str (to_hl ['ctermfg' ][2 ])) + ',' + str (to_hl ['fg_intensity' ])) or '' ) + '|' \
9494 + (to_hl ['bg' ] != None and (str (to_hl ['bg' ] or '' ) + ',' + (str (to_hl ['ctermbg' ][0 ])+ '-' + str (to_hl ['ctermbg' ][1 ])+ '-' + str (to_hl ['ctermbg' ][2 ])) + ',' + str (to_hl ['bg_intensity' ])) or '' ) + '|'
9595 + (to_hl ['sp' ] != None and (str (to_hl ['sp' ] or '' ) + str (to_hl ['sp_intensity' ])) or '' )
96- def modify (self , hl , target ):
96+ def modify (self , highlights , target ):
9797 if self .condition == False :
9898 return
9999 to_hl = self .to_hl
@@ -103,16 +103,17 @@ def modify(self, hl, target):
103103 target ['bg' ] = COLOR_UTIL .interpolate24b (target ['bg' ], to_hl ['bg' ], to_hl ['bg_intensity' ])
104104 if target ['ctermbg' ] != None and to_hl ['ctermbg' ] != None :
105105 target ['ctermbg' ] = COLOR_UTIL .interpolate256 (target ['ctermbg' ], to_hl ['ctermbg' ], to_hl ['bg_intensity' ])
106- if hl ['fg' ] != None and to_hl ['fg' ] != None :
107- hl ['fg' ] = COLOR_UTIL .interpolate24b (hl ['fg' ], to_hl ['fg' ], to_hl ['fg_intensity' ])
108- if hl ['bg' ] != None and to_hl ['bg' ] != None :
109- hl ['bg' ] = COLOR_UTIL .interpolate24b (hl ['bg' ], to_hl ['bg' ], to_hl ['bg_intensity' ])
110- if hl ['sp' ] != None and to_hl ['sp' ] != None :
111- hl ['sp' ] = COLOR_UTIL .interpolate24b (hl ['sp' ], to_hl ['sp' ], to_hl ['sp_intensity' ])
112- if hl ['ctermfg' ] != None and to_hl ['ctermfg' ] != None :
113- hl ['ctermfg' ] = COLOR_UTIL .interpolate256 (hl ['ctermfg' ], to_hl ['ctermfg' ], to_hl ['fg_intensity' ])
114- if hl ['ctermbg' ] != None and to_hl ['ctermbg' ] != None :
115- hl ['ctermbg' ] = COLOR_UTIL .interpolate256 (hl ['ctermbg' ], to_hl ['ctermbg' ], to_hl ['bg_intensity' ])
106+ for hl in highlights .values ():
107+ if hl ['fg' ] != None and to_hl ['fg' ] != None :
108+ hl ['fg' ] = COLOR_UTIL .interpolate24b (hl ['fg' ], to_hl ['fg' ], to_hl ['fg_intensity' ])
109+ if hl ['bg' ] != None and to_hl ['bg' ] != None :
110+ hl ['bg' ] = COLOR_UTIL .interpolate24b (hl ['bg' ], to_hl ['bg' ], to_hl ['bg_intensity' ])
111+ if hl ['sp' ] != None and to_hl ['sp' ] != None :
112+ hl ['sp' ] = COLOR_UTIL .interpolate24b (hl ['sp' ], to_hl ['sp' ], to_hl ['sp_intensity' ])
113+ if hl ['ctermfg' ] != None and to_hl ['ctermfg' ] != None :
114+ hl ['ctermfg' ] = COLOR_UTIL .interpolate256 (hl ['ctermfg' ], to_hl ['ctermfg' ], to_hl ['fg_intensity' ])
115+ if hl ['ctermbg' ] != None and to_hl ['ctermbg' ] != None :
116+ hl ['ctermbg' ] = COLOR_UTIL .interpolate256 (hl ['ctermbg' ], to_hl ['ctermbg' ], to_hl ['bg_intensity' ])
116117 return
117118 parent .attach = __Tint
118119 def value (parent , replacement = None ):
0 commit comments