Author: tfaber
Date: Tue Nov 19 10:18:02 2013
New Revision: 61047
URL:
http://svn.reactos.org/svn/reactos?rev=61047&view=rev
Log:
[NOTEPAD]
- Preserve modification flag when toggling the "Word Wrap" option. Patch by
Edijs Kolesnikovičs.
CORE-7589 #resolve
Modified:
trunk/reactos/base/applications/notepad/dialog.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Tue Nov 19 10:18:02
2013
@@ -130,7 +130,7 @@
{
LoadString(Globals.hInstance, STRING_UNTITLED, szCaption, SIZEOF(szCaption));
}
-
+
StringCchCat(szCaption, SIZEOF(szCaption), _T(" - "));
StringCchCat(szCaption, SIZEOF(szCaption), szNotepad);
SetWindowText(Globals.hMainWnd, szCaption);
@@ -790,6 +790,7 @@
DWORD dwStyle;
int iSize;
LPTSTR pTemp = NULL;
+ BOOL bModified = FALSE;
iSize = 0;
@@ -812,6 +813,9 @@
// Recover the text into the control.
GetWindowText(Globals.hEdit, pTemp, iSize + 1);
+
+ if (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0))
+ bModified = TRUE;
}
// Restore original window procedure
@@ -863,6 +867,9 @@
{
SetWindowText(Globals.hEdit, pTemp);
HeapFree(GetProcessHeap(), 0, pTemp);
+
+ if (bModified)
+ SendMessage(Globals.hEdit, EM_SETMODIFY, TRUE, 0);
}
// Sub-class a new window callback for row/column detection.