Skip to content

Commit

Permalink
Broke the update_header method into two separate methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJRyan authored and inducer committed Oct 6, 2023
1 parent 294c7a6 commit d8ff838
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2841,15 +2841,15 @@ 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:
caption.extend([
(None, " "),
("header warning", "[PROCESSING EXCEPTION - hit 'e' to examine]")
])
self.update_header(override=True)
self.show_header()
CONFIG["hide_header"] = False


Expand Down Expand Up @@ -2965,11 +2965,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

0 comments on commit d8ff838

Please sign in to comment.