-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
[cmdlog] sheets created with no keypresses show errors #2293
Comments
Okay I've got a clearer idea of exactly when this happens. It's when you create a sheet without using keystrokes. Like a command started by Line 412 in c702c35
Because the sheet isn't precious, it can't be found in vd.allSheets , so the command log is searched for keystrokes. But there are no keystrokes because the action that triggered the command wasn't a keypress.
|
As a secondary issue, I wonder if Line 417 in c702c35
has a remaining problem, when it uses rows[0] . It assumes the first row of the command log is the one that created the sheet. But they're usually set-options commands. (This same assumption caused a problem with undo in #2244.) It seems like that may cause an error.
I haven't yet found a case it does. But before I dig deeper, what is this shortcut code for? What's an example where a keystroke from the command log can be thought of as a shortcut? |
The shortcut shown on the status bar before the sheetname: Thanks for looking into all this, by the way. I know this code can get pretty convoluted over time. |
Small description
clicking on
dir_hidden
in the DirSheet guide raises an exceptionActual result with screenshot
Steps to reproduce with sample data and a .vd
vd .
, navigate tofilename
column to bring the DirSheet guide up, click ondir_hidden
Additional context
visidata 3.1dev
It looks like vs.shortcut is
None
because some code forshortcut()
is obsolete, where it checkscmdlog.rows[0].keystrokes
:visidata/visidata/cmdlog.py
Line 415 in aa9d261
The text was updated successfully, but these errors were encountered: