Skip to content

MaxWidth causes wrong row count? #87

Description

@gustaavv

I am using Win10, .net 6, and ConsoleTables 2.7.0.

I think the MaxWidth field causes wrong row count. Is this intended or a bug?

In addition, the bottom border of the table breaks.

Code:

using ConsoleTables;

class Program
{
    static void Main(string[] args)
    {
        var consoleTable = new ConsoleTable(new ConsoleTableOptions
        {
            Columns = new[] { "column" },
            EnableCount = true
        });

        consoleTable.MaxWidth = 2;

        consoleTable.AddRow("abcdefghi");

        consoleTable.Write();
    }
}

Output:

 ----------
 | column |
 ----------
 | ab     |
 ----------
 | cd     |
 ----------
 | ef     |
 ----------
 | gh     |
 ----------
 | i      |
 Count: 5--

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions