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

This commit is contained in:
Henry Kroll III 2010-03-06 21:05:21 -08:00 committed by Alexandre Julliard
parent e5c182f0df
commit d3369086ed
1 changed files with 3 additions and 1 deletions

View File

@ -297,7 +297,9 @@ BOOL DoCloseFile(void)
int nResult;
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 */
nResult = AlertFileNotSaved(Globals.szFileName);