From 9c99e5db7a3c6a1d294f8f3e56fe5de654110699 Mon Sep 17 00:00:00 2001 From: blasty Date: Sat, 25 Jul 2026 15:06:19 +0200 Subject: projects: open the Ctrl+O switcher on the binary you're already in It always highlighted row 0, so switching away and back meant hunting for your current position in the list. Preselect the entry marked active instead; if a filter excludes it, fall back to the first row as before. Locked in test_project_ui.py (21 checks). --- idatui/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'idatui/app.py') diff --git a/idatui/app.py b/idatui/app.py index f9ddfea..9ef0c47 100644 --- a/idatui/app.py +++ b/idatui/app.py @@ -2474,7 +2474,10 @@ class ProjectPalette(ModalScreen): opts.append(Option(label)) ol.add_options(opts) if rows: - ol.highlighted = 0 + # Land on the binary you're already in, so the switcher opens where + # you are rather than at whatever sorts first. + active = next((i for i, e in enumerate(rows) if e["active"]), 0) + ol.highlighted = active self.query_one("#pal-title", Static).update( f" binaries: {len(rows)} of {len(self._entries)}") -- cgit v1.3.1-sl0p