Fix context history with disabled context-sections (#2616)

When gdb is started and context is disabled by clearing `context-sections` before a context output was ever issued, the context history failed to handle the empty history. It assumed that there would always be data in one of the sections after running the context command.
pull/2627/head
peace-maker 12 months ago committed by GitHub
parent 9c734cfc17
commit c6922cc644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -337,6 +337,8 @@ def serve_context_history(function: Callable[P, List[str]]) -> Callable[P, List[
def history_handle_unchanged_contents() -> None:
if not context_history:
return
longest_history = max(len(h) for h in context_history.values())
for section_name, history in context_history.items():
# Duplicate the last entry if it is the same as the previous one

Loading…
Cancel
Save