Skip to content

Commit

Permalink
website bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyPatten committed Oct 24, 2023
1 parent 0eb8e52 commit 6448b23
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions Projects/Website/BlazorConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,37 @@ public struct Pixel
public bool CursorVisible = true;
public int LargestWindowWidth = 120;
public int LargestWindowHeight = 51;
public int CursorLeft = 0;
public int CursorTop = 0;

public int _windowHeight = 35;
public int _windowWidth = 80;
public int _cursorLeft = 0;
public int _cursorTop = 0;

public Encoding? OutputEncoding;

public int CursorLeft
{
get => _cursorLeft;
set
{
_cursorLeft = value;
StateHasChanged = true;
}
}

public int CursorTop
{
get => _cursorTop;
set
{
_cursorTop = value;
StateHasChanged = true;
}
}

public int WindowHeight
{
get => _windowHeight;
get => _windowHeight;
set
{
_windowHeight = value;
Expand Down Expand Up @@ -339,7 +359,7 @@ public void WriteNoRefresh(char c)
for (int row = 0; row < View.GetLength(0) - 1; row++)
{
for (int column = 0; column < View.GetLength(1); column++)
{
{
StateHasChanged = StateHasChanged || View[row, column] != View[row + 1, column];
View[row, column] = View[row + 1, column];
}
Expand Down Expand Up @@ -458,7 +478,7 @@ public async Task<string> ReadLine()
{
while (!KeyAvailableNoRefresh())
{
await Refresh();
await Refresh();
}
var keyInfo = InputBuffer.Dequeue();
switch (keyInfo.Key)
Expand Down

0 comments on commit 6448b23

Please sign in to comment.