Skip to content

Commit a9e027f

Browse files
committed
fill with space
1 parent 5469192 commit a9e027f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/XTerm.NET/Buffer/TerminalBuffer.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public class TerminalBuffer
1717
private int _scrollTop;
1818
private int _cols;
1919
private int _rows;
20-
private readonly BufferCell _fillCell;
2120

2221
/// <summary>
2322
/// The absolute line index of the top of the viewport in the buffer.
@@ -98,13 +97,12 @@ public TerminalBuffer(int cols, int rows, int scrollback)
9897
_x = 0;
9998
_scrollTop = 0;
10099
_scrollBottom = rows - 1;
101-
_fillCell = BufferCell.Empty;
102100
SavedCursorState = new SavedCursor();
103101

104102
// Initialize buffer with empty lines
105103
for (int i = 0; i < rows; i++)
106104
{
107-
_lines.Push(new BufferLine(cols, _fillCell));
105+
_lines.Push(new BufferLine(cols, BufferCell.Space));
108106
}
109107
}
110108

@@ -121,7 +119,7 @@ public TerminalBuffer(int cols, int rows, int scrollback)
121119
/// </summary>
122120
public BufferLine GetBlankLine(AttributeData attr, bool isWrapped = false)
123121
{
124-
var fillCell = BufferCell.Empty;
122+
var fillCell = BufferCell.Space;
125123
fillCell.Attributes = attr;
126124
return new BufferLine(_cols, fillCell) { IsWrapped = isWrapped };
127125
}
@@ -286,7 +284,7 @@ public void Resize(int newCols, int newRows)
286284
_lines.Resize(newMaxLength);
287285

288286
// Resize existing lines to the new column count
289-
var fillCell = BufferCell.Empty;
287+
var fillCell = BufferCell.Space;
290288
for (int i = 0; i < _lines.Length; i++)
291289
{
292290
_lines[i]?.Resize(newCols, fillCell);

src/XTerm.NET/Terminal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private void ClearBuffer()
334334
for (int i = 0; i < Rows; i++)
335335
{
336336
var line = _buffer.Lines[i];
337-
line?.Fill(BufferCell.Empty);
337+
line?.Fill(BufferCell.Space);
338338
}
339339
_buffer.SetCursor(0, 0);
340340
}

0 commit comments

Comments
 (0)