If it extended to the end of the line the length of the last attributes
run of a history line would not be initialized correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25968 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
53779f07a4
commit
535841fcb5
@ -90,7 +90,8 @@ HistoryBuffer::GetTerminalLineAt(int32 index, TerminalLine* buffer) const
|
||||
if (charCount == nextAttributesAt) {
|
||||
if (attributesRunCount > 0) {
|
||||
attributes = attributesRun->attributes;
|
||||
nextAttributesAt = attributesRun->offset + attributesRun->length;
|
||||
nextAttributesAt = attributesRun->offset
|
||||
+ attributesRun->length;
|
||||
attributesRun++;
|
||||
attributesRunCount--;
|
||||
} else {
|
||||
@ -180,6 +181,10 @@ HistoryBuffer::AddLine(const TerminalLine* line)
|
||||
i++;
|
||||
}
|
||||
|
||||
// set the last attributes run's length
|
||||
if (attributes != 0)
|
||||
attributesRun->length = line->length - attributesRun->offset;
|
||||
|
||||
historyLine->softBreak = line->softBreak;
|
||||
//debug_printf(" line: \"%.*s\", history size now: %ld\n", historyLine->byteLength, historyLine->Chars(), fSize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user