fix: empty command-palette filter no longer crashes the TUI render (issue #26)

This commit is contained in:
2026-07-15 20:20:30 +02:00
parent 39bb232b57
commit a8ca3b643b
2 changed files with 17 additions and 3 deletions

View File

@@ -230,6 +230,15 @@ defmodule BDS.TUITest do
assert is_binary(action)
end
test "input that matches no command renders without errors" do
state = mount_with_executor!() |> press(":") |> press("j")
# Filtering down to zero commands must not blow up the render
# (List panics on a selected index into an empty item list).
text = screen_text(state)
assert text =~ ":j"
end
test "no match reports an unknown command" do
state =
mount_with_executor!()