From 914c138e24bbe007d0e96a4a0270b9ab512e85f3 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Mon, 21 Feb 2005 20:39:52 +0000 Subject: [PATCH] Horizontal scrollbar is hidden when edit control is emptied. --- dlls/user/edit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/user/edit.c b/dlls/user/edit.c index deb542f5c2d..bb88f825013 100644 --- a/dlls/user/edit.c +++ b/dlls/user/edit.c @@ -3039,9 +3039,12 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac ORDER_UINT(s, e); + size = tl - (e - s) + strl; + if (!size) + es->text_width = 0; + /* Issue the EN_MAXTEXT notification and continue with replacing text * such that buffer limit is honored. */ - size = tl - (e - s) + strl; if ((honor_limit) && (es->buffer_limit > 0) && (size > es->buffer_limit)) { EDIT_NOTIFY_PARENT(es, EN_MAXTEXT, "EN_MAXTEXT"); strl = es->buffer_limit - (tl - (e-s));