Greptile flagged a pre-existing issue in Hammerspoon 2/Windows/ConsoleView.swift during review of PR #42. It is unrelated to that PR's scope.
Out-of-range crash on up-arrow with empty history
When evalHistory is empty, pressing up-arrow sets evalIndex = evalHistory.count - 1 = -1, then accesses evalHistory[-1], which crashes.
#42 (comment)
Fixed in PR #44.
Greptile flagged a pre-existing issue in
Hammerspoon 2/Windows/ConsoleView.swiftduring review of PR #42. It is unrelated to that PR's scope.Out-of-range crash on up-arrow with empty history
When
evalHistoryis empty, pressing up-arrow setsevalIndex = evalHistory.count - 1 = -1, then accessesevalHistory[-1], which crashes.#42 (comment)
Fixed in PR #44.