From 0958a207255c7d6121481840a5de78137babb162 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 8 Dec 1999 03:25:30 +0000 Subject: [PATCH] Fix problem with EN_UPDATE notification sent by edit control. --- controls/edit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/controls/edit.c b/controls/edit.c index 3f759dd73eb..c173c83bec1 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -2439,6 +2439,8 @@ static void EDIT_EM_ReplaceSel(WND *wnd, EDITSTATE *es, BOOL can_undo, LPCSTR lp es->flags |= EF_UPDATE; EDIT_EM_ScrollCaret(wnd, es); + EDIT_NOTIFY_PARENT(wnd, EN_UPDATE, "EN_UPDATE"); + /* FIXME: really inefficient */ InvalidateRect(wnd->hwndSelf, NULL, TRUE); } @@ -3687,9 +3689,6 @@ static void EDIT_WM_Paint(WND *wnd, EDITSTATE *es, WPARAM wParam) BOOL rev = es->bEnableState && ((es->flags & EF_FOCUSED) || (es->style & ES_NOHIDESEL)); - if (es->flags & EF_UPDATE) - EDIT_NOTIFY_PARENT(wnd, EN_UPDATE, "EN_UPDATE"); - if (!wParam) dc = BeginPaint(wnd->hwndSelf, &ps); else @@ -3888,6 +3887,9 @@ static void EDIT_WM_SetText(WND *wnd, EDITSTATE *es, LPCSTR text) es->flags &= ~EF_MODIFIED; EDIT_EM_SetSel(wnd, es, 0, 0, FALSE); EDIT_EM_ScrollCaret(wnd, es); + + if (es->flags & EF_UPDATE) + EDIT_NOTIFY_PARENT(wnd, EN_UPDATE, "EN_UPDATE"); } -- 2.11.4.GIT