From 4051146ec37c8cf910438d77b2d16c0cb2650526 Mon Sep 17 00:00:00 2001 From: Sooraj Sannabhadti <2005sooraj@gmail.com> Date: Thu, 22 Feb 2024 15:03:17 -0800 Subject: [PATCH] Fixed issue with warning popping up on empty file --- Encryptext.pyw | 1 + 1 file changed, 1 insertion(+) diff --git a/Encryptext.pyw b/Encryptext.pyw index 3c2fef5..724dee6 100644 --- a/Encryptext.pyw +++ b/Encryptext.pyw @@ -159,6 +159,7 @@ def openFile(Event=None, current=False): tag_no = 0 # Check if the textbox is empty + if len(textbox.get("1.0", tk.END)) != 2 and textbox.get("1.0", tk.END) != "\n\n" and not current: new_file_confirm = messagebox.askyesno("Open File", "Open a file?\n\nAny unsaved changes will be lost.") else: new_file_confirm = True