[NOTEPAD]

- Preserve modification flag when toggling the "Word Wrap" option. Patch by Edijs Kolesnikovičs.
CORE-7589 #resolve

svn path=/trunk/; revision=61047
This commit is contained in:
Thomas Faber 2013-11-19 10:18:02 +00:00
parent 1722e89f78
commit a5c44c54db

View file

@ -130,7 +130,7 @@ static void UpdateWindowCaption(void)
{
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 @@ VOID DoCreateEditWindow(VOID)
DWORD dwStyle;
int iSize;
LPTSTR pTemp = NULL;
BOOL bModified = FALSE;
iSize = 0;
@ -812,6 +813,9 @@ VOID DoCreateEditWindow(VOID)
// 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 @@ VOID DoCreateEditWindow(VOID)
{
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.