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

Can't click or switch to errors_recent tabs #2573

Open
daviewales opened this issue Oct 17, 2024 · 3 comments
Open

Can't click or switch to errors_recent tabs #2573

daviewales opened this issue Oct 17, 2024 · 3 comments
Labels

Comments

@daviewales
Copy link
Contributor

Small description

If I press Ctrl+E to view an error, a tab appears in the status bar called errors_recent. However, if I switch to a different tab, I can't click on the errors_recent tab to return to it. I also can't switch to it with Alt+NUMBER.
I have to use the Sheets sheet to interact with it.

Data to reproduce

Open Visidata in a way which creates a Python error. (Put 1/0 in your .visidatarc)

Steps to reproduce

Press Ctrl+E in Visidata after a Python error is reported.

Expected result

Expect to be able to interact with errors_recent tabs the same as other tabs.

Configuration

Reproduces with current release saul.pw/VisiData v3.1.1

Additional context

  • What platform and version are you using (Linux, MacOS, Windows)? Linux (WSL)

  • Which version of Python? 3.10.12

  • Which terminal are you using (for display and input issues)? Windows Terminal (WSL)

@daviewales daviewales added the bug label Oct 17, 2024
@midichef
Copy link
Contributor

I can reproduce this behavior on Ubuntu. I also see the problem with StatusSheet, not just ErrorSheet. And more generally, any sheet that satisfies not sheet.precious:

if vs.precious and vs not in vd.allSheets:

Because ErrorSheet has self.precious = False, it doesn't get added to vd.allSheets during vd.push(). A sheet needs its position in allSheets to calculate its shortcut. The shortcut is needed for a mouse-click to switch tabs, by running the command jump-sheet-{shortcut}. For these sheets, that turns into jump-sheet-, which fails.

I'm not sure what the right fix is.

@saulpw
Copy link
Owner

saulpw commented Oct 18, 2024

What if we didn't show non-precious sheets on the sheets tab? The whole point is that they're disposable.

@daviewales
Copy link
Contributor Author

Would that mean they also don't get a named tab? I think that's less confusing. If they don't appear as a tab, then I won't be confused when I can't click on them. Another interesting thing I noticed was that if I keep pressing Ctrl+E, duplicate error sheets are created, rather than just jumping me back to the original one.

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

No branches or pull requests

3 participants