Skip to content

Commit

Permalink
Fix off by one error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-clarke committed Oct 7, 2024
1 parent 21a727e commit 8604d85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/vscode/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def split_window():
actions.user.vscode("workbench.action.splitEditor")

def split_number(index: int):
ordinal = [
supported_ordinals = [
"First",
"Second",
"Third",
Expand All @@ -233,11 +233,10 @@ def split_number(index: int):
"Sixth",
"Seventh",
"Eighth",
"Last",
]

if 0 <= index < len(ordinal):
actions.user.vscode(f"workbench.action.focus{ordinal[index]}EditorGroup")
if 0 <= index - 1 < len(supported_ordinals):
actions.user.vscode(f"workbench.action.focus{supported_ordinals[index - 1]}EditorGroup")

# splits.py support end

Expand Down

0 comments on commit 8604d85

Please sign in to comment.