edit: hide horizontal scrollbar if edit control is empty

Lauri Tulmin lauri_ at ut.ee
Sun Feb 20 13:42:18 CST 2005


In real windows horizontal scrollbar is hidden when edit control is 
emptied, this patch makes wine behave in the same way.
-------------- next part --------------
Index: dlls/user/edit.c
===================================================================
RCS file: /home/wine/wine/dlls/user/edit.c,v
retrieving revision 1.16
diff -u -p -r1.16 edit.c
--- dlls/user/edit.c	16 Feb 2005 16:28:34 -0000	1.16
+++ dlls/user/edit.c	20 Feb 2005 19:11:55 -0000
@@ -3039,9 +3039,12 @@ static void EDIT_EM_ReplaceSel(EDITSTATE
 
 	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));


More information about the wine-patches mailing list