Terminal: insert space on tab only at the end of the line.
This commit is contained in:
@@ -745,9 +745,11 @@ BasicTerminalBuffer::InsertTab()
|
|||||||
if (x != fCursor.x) {
|
if (x != fCursor.x) {
|
||||||
TerminalLine* line = _LineAt(fCursor.y);
|
TerminalLine* line = _LineAt(fCursor.y);
|
||||||
for (int32 i = fCursor.x; i <= x; i++) {
|
for (int32 i = fCursor.x; i <= x; i++) {
|
||||||
|
if (line->length <= i) {
|
||||||
line->cells[i].character = ' ';
|
line->cells[i].character = ' ';
|
||||||
line->cells[i].attributes = fAttributes;
|
line->cells[i].attributes = fAttributes;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
fCursor.x = x;
|
fCursor.x = x;
|
||||||
if (line->length < fCursor.x)
|
if (line->length < fCursor.x)
|
||||||
line->length = fCursor.x;
|
line->length = fCursor.x;
|
||||||
|
|||||||
Reference in New Issue
Block a user