Handle char attribute "holes" in Terminal History lines
Previous implementation doesn't care about characters that are not covered by attributes run length array elements - so the attributes of the next run array element was taken instead of default one on the HistoryBuffer::GetTerminalLine() call. Note that this was the case of "holes" in run array but not the characters after the end of run array elements.
This commit is contained in:
parent
b512213be6
commit
73d0eee58c
@ -88,7 +88,11 @@ HistoryBuffer::GetTerminalLineAt(int32 index, TerminalLine* buffer) const
|
||||
for (int32 i = 0; i < line->byteLength;) {
|
||||
// get attributes
|
||||
if (charCount == nextAttributesAt) {
|
||||
if (attributesRunCount > 0) {
|
||||
if (charCount < attributesRun->offset) {
|
||||
// the "hole" in attributes run
|
||||
attributes = 0;
|
||||
nextAttributesAt = attributesRun->offset;
|
||||
} else if (attributesRunCount > 0) {
|
||||
attributes = attributesRun->attributes;
|
||||
nextAttributesAt = attributesRun->offset
|
||||
+ attributesRun->length;
|
||||
|
Loading…
Reference in New Issue
Block a user