From d6422f9eacf914172653c361a141e16497a81d27 Mon Sep 17 00:00:00 2001 From: blasty Date: Thu, 9 Jul 2026 12:14:18 +0200 Subject: add Ctrl+B toggle to show/hide the functions pane - action_toggle_functions: collapse/restore left pane, disasm takes full width; focus follows (disasm when hidden, table when shown) - pilot test covers the toggle (11/11) --- tests/test_tui.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_tui.py b/tests/test_tui.py index 752f72f..8769321 100644 --- a/tests/test_tui.py +++ b/tests/test_tui.py @@ -12,7 +12,7 @@ import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from idatui.app import DisasmView, IdaTui # noqa: E402 +from idatui.app import DisasmView, FunctionsPanel, IdaTui # noqa: E402 from textual.widgets import DataTable, Static # noqa: E402 PASS = FAIL = 0 @@ -111,6 +111,19 @@ async def run(db): ) check("filter narrowed the list", filtered, f"rows={table.row_count} of {nfuncs}") + # Toggle the functions pane show/hide. + left = app.query_one("#left", FunctionsPanel) + await pilot.press("ctrl+b") + await pilot.pause(0.1) + check("ctrl+b hides functions pane + focuses disasm", + not left.display and isinstance(app.focused, DisasmView), + f"display={left.display} focus={type(app.focused).__name__}") + await pilot.press("ctrl+b") + await pilot.pause(0.1) + check("ctrl+b again restores pane + focuses table", + left.display and isinstance(app.focused, DataTable), + f"display={left.display} focus={type(app.focused).__name__}") + def main(argv): db = None -- cgit v1.3.1-sl0p