diff --git a/src/termpdf.py b/src/termpdf.py index 5e67424..900acc9 100755 --- a/src/termpdf.py +++ b/src/termpdf.py @@ -105,12 +105,15 @@ def display_pdf(pdf_filename): if not found: print(f"No matches found for '{keyword}'.") else: - print("Search completed. Press 'q' to exit or any other key to continue searching.") + print("Search completed. Press 'q' to exit, 'Enter' to continue searching, or any other key to go back to the previous page.") - while True: - response = input() - if response.lower() == 'q': - return + response = input() + if response.lower() == 'q': + return + elif response == '': + continue + else: + print("Invalid choice. Going back to the previous page.") except Exception as e: print(f"Error: {e}") @@ -120,7 +123,6 @@ def display_pdf(pdf_filename): - def main(): print("\n" "▀▀█▀▀ █▀▀ █▀▀█ █▀▄▀█ ▒█▀▀█ ▒█▀▀▄ ▒█▀▀▀   ▒█░░▒█ ░▀░ █▀▀ █░░░█ █▀▀ █▀▀█\n"