EM_UNDO should always return TRUE for single line edit.

This commit is contained in:
Krishna Murthy 2004-05-07 00:40:18 +00:00 committed by Alexandre Julliard
parent f950d97381
commit a7c3107148
1 changed files with 7 additions and 3 deletions

View File

@ -3534,11 +3534,15 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es)
INT ulength;
LPWSTR utext;
/* Protect read-only edit control from modification */
if(es->style & ES_READONLY)
return FALSE;
/* As per MSDN spec, for a single-line edit control,
the return value is always TRUE */
if( es->style & ES_READONLY )
return !(es->style & ES_MULTILINE);
ulength = strlenW(es->undo_text);
if( ulength == 0 )
return !(es->style & ES_MULTILINE);
utext = HeapAlloc(GetProcessHeap(), 0, (ulength + 1) * sizeof(WCHAR));
strcpyW(utext, es->undo_text);