Show More
@@ -311,6 +311,15 b' def extstyles():' | |||
|
311 | 311 | for name, ext in extensions.extensions(): |
|
312 | 312 | _styles.update(getattr(ext, 'colortable', {})) |
|
313 | 313 | |
|
314 | def valideffect(effect): | |
|
315 | 'Determine if the effect is valid or not.' | |
|
316 | good = False | |
|
317 | if not _terminfo_params and effect in _effects: | |
|
318 | good = True | |
|
319 | elif effect in _terminfo_params or effect[:-11] in _terminfo_params: | |
|
320 | good = True | |
|
321 | return good | |
|
322 | ||
|
314 | 323 | def configstyles(ui): |
|
315 | 324 | for status, cfgeffects in ui.configitems('color'): |
|
316 | 325 | if '.' not in status or status.startswith('color.'): |
@@ -319,9 +328,7 b' def configstyles(ui):' | |||
|
319 | 328 | if cfgeffects: |
|
320 | 329 | good = [] |
|
321 | 330 | for e in cfgeffects: |
|
322 |
if |
|
|
323 | good.append(e) | |
|
324 | elif e in _terminfo_params or e[:-11] in _terminfo_params: | |
|
331 | if valideffect(e): | |
|
325 | 332 | good.append(e) |
|
326 | 333 | else: |
|
327 | 334 | ui.warn(_("ignoring unknown color/effect %r " |
General Comments 0
You need to be logged in to leave comments.
Login now