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 committed Oct 1, 2023
1 parent 1326cb2 commit 0b03658
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 @@ -2839,15 +2839,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 @@ -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

0 comments on commit 0b03658

Please sign in to comment.