Fix stupid typo that broke goto_session -1

This commit is contained in:
Kovid Goyal 2025-08-22 19:46:22 +05:30
parent 14cbf5cb73
commit b401827881
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -459,7 +459,7 @@ def goto_session(boss: BossType, cmdline: Sequence[str]) -> None:
idx = 0
if idx < 0:
if boss.active_session:
nidx = max(0, len(goto_session_history) - 1 - idx)
nidx = max(0, len(goto_session_history) - 1 + idx)
if nidx < len(goto_session_history):
switch_to_session(boss, goto_session_history[nidx])
return