Commit d3369086 authored by Henry Kroll III's avatar Henry Kroll III Committed by Alexandre Julliard

notepad: Don't prompt to save empty Untitled file.

parent e5c182f0
...@@ -297,7 +297,9 @@ BOOL DoCloseFile(void) ...@@ -297,7 +297,9 @@ BOOL DoCloseFile(void)
int nResult; int nResult;
static const WCHAR empty_strW[] = { 0 }; static const WCHAR empty_strW[] = { 0 };
if (SendMessageW(Globals.hEdit, EM_GETMODIFY, 0, 0)) nResult=GetWindowTextLengthW(Globals.hEdit);
if (SendMessageW(Globals.hEdit, EM_GETMODIFY, 0, 0) &&
(nResult || Globals.szFileName[0]))
{ {
/* prompt user to save changes */ /* prompt user to save changes */
nResult = AlertFileNotSaved(Globals.szFileName); nResult = AlertFileNotSaved(Globals.szFileName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment