mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 23:56:05 +02:00
Console fixes
This commit is contained in:
parent
ac718dde19
commit
9209511cd7
3 changed files with 10 additions and 1 deletions
|
@ -173,7 +173,7 @@ class ConsolePanel : Panel
|
|||
{
|
||||
var cellInfo = mConsolePanel.mConsoleProvider.GetCell(i);
|
||||
|
||||
if ((i % numVisibleCols == 0) && (i != selStart))
|
||||
if ((numVisibleCols > 0) && (i % numVisibleCols == 0) && (i != selStart))
|
||||
{
|
||||
// Start of new line
|
||||
while ((str.Length > 0) && (str[str.Length - 1] == ' '))
|
||||
|
@ -275,6 +275,8 @@ class ConsolePanel : Panel
|
|||
|
||||
public static Position FromIndex(int index, int width)
|
||||
{
|
||||
if (width == 0)
|
||||
return .((.)index, 0);
|
||||
return .((.)(index % width), (.)(index / width));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue