From e546525eacc7deab3ee36a61d9821cfd5ec0e0a1 Mon Sep 17 00:00:00 2001 From: Whindmar Saksit Date: Sat, 10 Aug 2024 17:08:00 +0200 Subject: [PATCH] [NOTEPAD] Don't leave junk behind when opening smaller file (#7227) --- base/applications/notepad/dialog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c index 17939fbd16d..6f61df4b899 100644 --- a/base/applications/notepad/dialog.c +++ b/base/applications/notepad/dialog.c @@ -343,6 +343,7 @@ VOID DoOpenFile(LPCTSTR szFileName) return; WaitCursor(TRUE); + SetWindowText(Globals.hEdit, NULL); hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);