Fix resize freeze on full-width chars in Terminal history
In the Terminal data model every full width character occupies two cells in the data buffers. The second cell of such characters is not drawn and used mainly to differentiate between full width and half width characters. Proposed fix zeroes the attributes of the second cell in the HistoryBuffer::GetTerminalLineAt() that prevents the potential endless loops in the BasicTerminalBuffer::_ResizeRedraw(). Those loops were result of the random attributes in full width character's second cells.
This commit is contained in:
parent
7e1f963596
commit
07d1d01afc
@ -121,7 +121,9 @@ HistoryBuffer::GetTerminalLineAt(int32 index, TerminalLine* buffer) const
|
||||
// full width char?
|
||||
if (cell.character.IsFullWidth()) {
|
||||
cell.attributes |= A_WIDTH;
|
||||
charCount++;
|
||||
// attributes of the second, "invisible" cell must be
|
||||
// cleared to let full-width chars detection work properly
|
||||
buffer->cells[charCount++].attributes = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user