jp: replace no_lf argument by end in disp (same as in print)

This commit is contained in:
Goffi 2020-11-12 14:53:16 +01:00
commit f4c7f5e55e

View file

@ -203,10 +203,14 @@ class Theme(base.CommandBase):
color = getattr(C, attr)
if attr == 'A_LEVEL_COLORS':
# This constant contains multiple colors
self.disp('LEVEL COLORS: ', no_lf=True)
self.disp('LEVEL COLORS: ', end=' ')
for idx, c in enumerate(color):
last = idx == len(color)-1
self.disp(c + f'LEVEL_{idx}' + A.RESET + (', ' if not last else ''), no_lf=not last)
end = '\n' if last else ' '
self.disp(
c + f'LEVEL_{idx}' + A.RESET + (', ' if not last else ''),
end=end
)
else:
text = attr[2:]
self.disp(A.color(color, text))