From 0b036583b6d4910190d9b55749632fa36f92a0b6 Mon Sep 17 00:00:00 2001 From: Thomas Ryan Date: Sun, 1 Oct 2023 18:04:32 -0400 Subject: [PATCH] Broke the update_header method into two separate methods --- pudb/debugger.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pudb/debugger.py b/pudb/debugger.py index ada78a50..afcfe34b 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -2839,7 +2839,7 @@ def interaction(self, exc_tuple, show_exc_dialog=True): (None, " "), ("header warning", "[POST-MORTEM MODE]") ]) - self.update_header(override=True) + self.show_header() CONFIG["hide_header"] = False elif exc_tuple is not None: @@ -2847,7 +2847,7 @@ def interaction(self, exc_tuple, show_exc_dialog=True): (None, " "), ("header warning", "[PROCESSING EXCEPTION - hit 'e' to examine]") ]) - self.update_header(override=True) + self.show_header() CONFIG["hide_header"] = False @@ -2963,11 +2963,14 @@ def make_frame_ui(i, frame_lineno): def update_cmdline_win(self): self.set_cmdline_state(not CONFIG["hide_cmdline_win"]) - def update_header(self, override=None): - if override is not None: - self.top._w.header = self.header if override else None + def update_header(self): + """Update the header to reflect the current settings.""" self.top._w.header = self.header if not CONFIG["hide_header"] else None + def show_header(self): + """Show the header.""" + self.top._w.header = self.header + # }}} # vim: foldmethod=marker:expandtab:softtabstop=4