diff --git a/tests/ui_tools/test_popups.py b/tests/ui_tools/test_popups.py index 878be178c4..b0bd1cf8fa 100644 --- a/tests/ui_tools/test_popups.py +++ b/tests/ui_tools/test_popups.py @@ -1428,7 +1428,7 @@ def test_stream_info_content__sections(self) -> None: "stream_email_present, expected_copy_text", [ (False, "< Stream email is unavailable >"), - (True, "Press 'c' to copy Stream email address"), + (True, "Press [c] to copy Stream email address"), ], ) def test_stream_info_content__email_copy_text( diff --git a/zulipterminal/core.py b/zulipterminal/core.py index 14c12be572..a87c92ed17 100644 --- a/zulipterminal/core.py +++ b/zulipterminal/core.py @@ -674,6 +674,7 @@ def no_prompt_exit_handler(self, signum: int, frame: Any) -> None: self.deregister_client() def prompting_exit_handler(self, signum: int, frame: Any) -> None: + self.view.set_footer_text() question = urwid.Text( ("bold", " Please confirm that you wish to exit Zulip-Terminal "), "center", @@ -721,6 +722,16 @@ def _raise_exception(self, *args: Any, **kwargs: Any) -> Literal[True]: full_traceback = "".join(traceback.format_exception(*exc)) self.show_exception_popup(message, traceback=full_traceback, width=80) self._exception_info = None + + if full_traceback != "": + text = [ + "An exception occurred: ", + "Press [c] to copy traceback to clipboard.", + ] + else: + text = ["Press [Esc] to exit popup."] + + self.view.set_footer_text(text, "task:error") return True # If don't raise, retain pipe def main(self) -> None: diff --git a/zulipterminal/ui_tools/views.py b/zulipterminal/ui_tools/views.py index 00158f88e2..f0cd8e4b15 100644 --- a/zulipterminal/ui_tools/views.py +++ b/zulipterminal/ui_tools/views.py @@ -1091,6 +1091,8 @@ def __init__( def keypress(self, size: urwid_Size, key: str) -> str: if is_command_key("COPY_TRACEBACK", key): self.controller.copy_to_clipboard(self.traceback, "Traceback") + if is_command_key("GO_BACK", key): + self.controller.view.set_footer_text() return super().keypress(size, key)