diff kitten: Do not specify the default foreground color in formatting codes.

Fixes an issue with foreground color being incorrect after a highlighted
segment if the syntax highlight does not specify a foreground color at
the boundary.
This commit is contained in:
Kovid Goyal
2018-05-20 08:51:41 +05:30
parent 709d19119d
commit 9cab8a2de5
3 changed files with 12 additions and 4 deletions

View File

@@ -19,6 +19,11 @@ class Segment:
self.start = start
self.start_code = start_code
def __repr__(self):
return 'Segment(start={!r}, start_code={!r}, end={!r}, end_code={!r})'.format(
self.start, self.start_code, getattr(self, 'end', None), getattr(self, 'end_code', None)
)
class Collection: