Skip to content

Don't display empty rows when wrapped content is clipped #359

Open
@gdamore

Description

@gdamore

I have some tables that have some long fields that get clipped away by default (using the terminal width to fit.)

Those fields wrap, which is fine, but as they aren't being displayed (because its clipped with the incomplete character), it leads to a surprising effect where there are lines that appear to be devoid of content.

I'd suggest that if you find that you're rendering only spaces on a line (besides the column separators and the incomplete line indicator of course), that you suppress that row.

This should probably be tunable, because I can see some arguments for having it, although in my use case I'd like to have the behavior I propose here be default. Maybe a table option.

For now I'm filtering the output looking for non-whitespace characters (and characters that are not the separator or padding) and if I don't find any, then I suppress that row before I print it out. Its kind of a hack, but it is working for me for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions