Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[errors-] create Error(s)Sheet only if it is not already open #2671

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

midichef
Copy link
Contributor

@midichef midichef commented Jan 8, 2025

Fixes an inconvenience noted by @daviewales as part of #2573:

if I keep pressing Ctrl+E, duplicate error sheets are created, rather than just jumping me back to the original one.

visidata/textsheet.py Outdated Show resolved Hide resolved
@midichef
Copy link
Contributor Author

Should I use an explicit source=None parameter when creating the sheets, in ErrorsSheet("errors_all") and ErrorSheet("errors_recent")? They're getting it initialized like that from BaseSheet already.

@saulpw
Copy link
Owner

saulpw commented Jan 15, 2025

Should I use an explicit source=None parameter when creating the sheets, in ErrorsSheet("errors_all") and ErrorSheet("errors_recent")? They're getting it initialized like that from BaseSheet already.

No, let them use the default.

visidata/textsheet.py Outdated Show resolved Hide resolved
@anjakefala
Copy link
Collaborator

I found a bug with this fix!

To reproduce, put 1/0 in your ~/.visidatarc.
Press ^E, and it will correctly open the ZeroDivisionError.

Then type a column without numerical values with #. Use z^E on one of the cells, and it will incorrectly load the ZeroDivisionError as the cell error.

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

Successfully merging this pull request may close these issues.

3 participants