From cdc6f39572d87de24435c69920601a379f1e2e03 Mon Sep 17 00:00:00 2001 From: blasty Date: Sat, 25 Jul 2026 15:55:36 +0200 Subject: strings: F2 widens the strings browser to the whole project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completes phase 2 — the index already carried strings (KIND_STRING), the palette just didn't offer the toggle. StringsPalette now mirrors SymbolPalette: F2 flips between this binary and the project, project rows are prefixed with their binary, and choosing a literal in another binary switches to it and jumps. Ranking matches the symbol side: the trigram index guarantees the match, so ordering is earliest-match then shortest, with a (binary, addr) tiebreak — the same tie that crashed symbol search when two binaries shared a name, avoided here by construction. Project scope caps at 60 like symbols. _results is now (binary, addr, text) tuples in both palettes, so _on_string_chosen takes the same (binary, addr) choice and routes through _switch_then_goto. test_project_ui.py: local scope stays single-binary, F2 spans >=2 binaries (23 checks). Suite 191/0. --- tests/test_scenarios.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_scenarios.py') diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py index 7c41f1f..49bb6b9 100644 --- a/tests/test_scenarios.py +++ b/tests/test_scenarios.py @@ -424,10 +424,10 @@ async def s_strings(c: Ctx): pal.query_one(Input).value = frag await c.pause(0.2) ok = (pal._results - and all(frag.lower() in s.text.lower() for s in pal._results)) + and all(frag.lower() in t.lower() for _, _, t in pal._results)) c.check("filtering narrows to matching strings", bool(ok), f"frag={frag!r} n={len(pal._results)}") - want = pal._results[0].addr + want = pal._results[0][1] await c.press("enter") await c.wait(lambda: not isinstance(app.screen, StringsPalette), 10) landed = await c.wait(lambda: c.lst._cursor_ea() == want, 20) -- cgit v1.3.1-sl0p