mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
smartlog: simplify the coloration code with a list compression
Shorte, easier to read.
This commit is contained in:
parent
ad5b4b4916
commit
ab68fa3ea3
@ -43,11 +43,7 @@ def uisetup(ui):
|
||||
elif char == "x":
|
||||
color = "\033[30m\033[1m"
|
||||
if color is not None:
|
||||
newtext = []
|
||||
for line in text:
|
||||
line = color + line + "\033[0m"
|
||||
newtext.append(line)
|
||||
text = newtext
|
||||
text = [color + line + "\033[0m" for line in text]
|
||||
return orig(ui, state, type, char, text, coldata)
|
||||
wrapfunction(graphmod, 'ascii', ascii)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user