[PATCH]: Minor cleanup in menubar_draw()

Pavel Tsekov ptsekov at gmx.net
Fri Aug 5 10:38:39 UTC 2005


Hello,

hline() is used in so many places that if it had some bugs they would be
noticed by now. I tested the patch and I haven't observed any visual
problems.

2005-08-05  Pavel Tsekov  <ptsekov at gmx.net>

	* menu.c (menubar_draw): Use hline() instead of addch() to clear
	the menubar widget area.
-------------- next part --------------
Index: src/menu.c
===================================================================
RCS file: /cvsroot/mc/mc/src/menu.c,v
retrieving revision 1.50
diff -u -p -r1.50 menu.c
--- src/menu.c	27 May 2005 03:35:15 -0000	1.50
+++ src/menu.c	5 Aug 2005 10:28:44 -0000
@@ -160,9 +160,7 @@ static void menubar_draw (WMenu *menubar
     attrset (SELECTED_COLOR);
     widget_move (&menubar->widget, 0, 0);
 
-    /* ncurses bug: it should work with hline but it does not */
-    for (i =  menubar->widget.cols; i; i--)
-	addch (' ');
+    hline (' ', menubar->widget.cols);
 
     attrset (SELECTED_COLOR);
     /* Now each one of the entries */


More information about the mc-devel mailing list