From 5f5213ade89b7a91af8a9c1219be2a462d41d65f Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sat, 13 Feb 1999 09:04:22 +0000 Subject: [PATCH] An app left junk in the undo buffer of an edit control upon creation. --- controls/edit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controls/edit.c b/controls/edit.c index e6b3c01430b..25603802fb8 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -3024,6 +3024,8 @@ static LRESULT EDIT_WM_Create(WND *wnd, EDITSTATE *es, LPCREATESTRUCT32A cs) * functions can be called, and in what order. */ EDIT_WM_SetFont(wnd, es, 0, FALSE); + EDIT_EM_EmptyUndoBuffer(wnd, es); + if (cs->lpszName && *(cs->lpszName) != '\0') { EDIT_EM_ReplaceSel(wnd, es, FALSE, cs->lpszName); /* if we insert text to the editline, the text scrolls out of the window, as the caret is placed after the insert pos normally; thus we reset es->selection... to 0 and update caret */