Skip to content

Commit

Permalink
[main-] apply +:col:row arg to all sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
midichef committed Jun 21, 2024
1 parent 4306dc9 commit b8d1689
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions visidata/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ def parsePos(vd, arg:str, inputs:'list[tuple[str, dict]]'=None):

pos = arg.split(':')
if len(pos) == 1:
startsheets = [Path(inputs[-1][0]).base_stem] if inputs else None
startrow = arg
elif len(pos) == 2:
startsheets = [Path(inputs[-1][0]).base_stem] if inputs else None
startcol, startrow = pos
else:
# the first element of pos is the startsheet,
# the later elements (if present) describe the branch to a subsheet
startsheets = pos[:-2]
if startsheets == ['']: startsheets = []
startcol, startrow = pos[-2:]
if startcol == '': startcol = None
if startrow == '': startrow = None
Expand Down

0 comments on commit b8d1689

Please sign in to comment.