Small description
ga command fails to add rows in a new Sheet
Steps to reproduce
vdShift-a for a new Sheet (enter a number of columns for that sheet when asked, e.g. 2)ga to add some new rows (enter a number of columns for that sheet when asked, e.g. 10)Below is the commandlog (saved with Ctrl-d) to show the steps that led to the issue:
sheet col row longname input keystrokes comment
open-file . o
add-sheet 2 A
unnamed add-rows 10 ga
Expected result
With v.1.5.2, 10 rows would have been added.
Actual result with screenshot
With v.2.-1dev, vd reports AttributeError: 'Sheet' object has no attribute 'newRow' | "10".

Below is the full stack trace (saved with Ctrl-e):
Traceback (most recent call last):
File "/Users/me/Library/Python/3.7/lib/python/site-packages/visidata/threads.py", line 197, in _toplevelTryFunc
t.status = func(*args, **kwargs)
File "/Users/me/Library/Python/3.7/lib/python/site-packages/visidata/data.py", line 53, in addRows
sheet.addRow(sheet.newRow(), idx+1)
AttributeError: 'Sheet' object has no attribute 'newRow'
@for-coursera :+1: Excellent bug report! It really helped me narrow in on the problem.
Most loaders/specialised sheets have their own newRow module implemented (e.g. https://github.com/saulpw/visidata/blob/develop/visidata/loaders/tsv.py#L111). However, the basic Sheet did not! This is why the issue only popped up when you created a new blank sheet. =)
Should be fixed now. Thanks!
Do confirm, works for me after the upgrade.
Most helpful comment
@for-coursera :+1: Excellent bug report! It really helped me narrow in on the problem.
Most loaders/specialised sheets have their own
newRowmodule implemented (e.g. https://github.com/saulpw/visidata/blob/develop/visidata/loaders/tsv.py#L111). However, the basicSheetdid not! This is why the issue only popped up when you created a new blank sheet. =)Should be fixed now. Thanks!