EM_UNDO should always return TRUE for single line edit.
This commit is contained in:
parent
f950d97381
commit
a7c3107148
|
@ -3534,11 +3534,15 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es)
|
||||||
INT ulength;
|
INT ulength;
|
||||||
LPWSTR utext;
|
LPWSTR utext;
|
||||||
|
|
||||||
/* Protect read-only edit control from modification */
|
/* As per MSDN spec, for a single-line edit control,
|
||||||
if(es->style & ES_READONLY)
|
the return value is always TRUE */
|
||||||
return FALSE;
|
if( es->style & ES_READONLY )
|
||||||
|
return !(es->style & ES_MULTILINE);
|
||||||
|
|
||||||
ulength = strlenW(es->undo_text);
|
ulength = strlenW(es->undo_text);
|
||||||
|
if( ulength == 0 )
|
||||||
|
return !(es->style & ES_MULTILINE);
|
||||||
|
|
||||||
utext = HeapAlloc(GetProcessHeap(), 0, (ulength + 1) * sizeof(WCHAR));
|
utext = HeapAlloc(GetProcessHeap(), 0, (ulength + 1) * sizeof(WCHAR));
|
||||||
|
|
||||||
strcpyW(utext, es->undo_text);
|
strcpyW(utext, es->undo_text);
|
||||||
|
|
Loading…
Reference in New Issue