Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[sheets] fix errors on sheets with no columns #2124

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

midichef
Copy link
Contributor

This PR fixes an error when hide-col hides the only column:

File "/home/midichef/.local/lib/python3.10/site-packages/visidata/sheets.py", line 789, in calc_height
    return max(len(lines) for _, _, lines in displines.values())
ValueError: max() arg is an empty sequence

and a minor error when resize-col-max is run on a sheet with no columns:

AttributeError: 'NoneType' object has no attribute 'toggleWidth'

Copy link
Collaborator

@anjakefala anjakefala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, and both work great! Thanks. =)

@anjakefala anjakefala merged commit 1df1bd2 into saulpw:develop Nov 19, 2023
12 checks passed
@midichef midichef deleted the zero_cols_commands branch November 27, 2023 05:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants