[net.emacs] uEmacs 3.7 display bug

wwc@newton.physics.purdue.edu.ARPA (William W. Carlson) (09/08/86)

There is a minor bug in display.c which causes certain lines to be continually
"updateline"ed even though they do not change.  This in turn causes excessive
calls to typeahead(), which on a BSD system is rather slow.  The fix simply
resets the line changed flag, as it is reset at the bottom of updateline().
This bug does not effect the function of uEmacs, just its performance.

Here is the diff -c
------
*** display.c.old	Sun Sep  7 08:27:33 1986
--- display.c	Mon Sep  8 08:16:19 1986
***************
*** 705,713
   * be hard operations that do a lot of update, so I don't really care.
   */
  	/* if both lines are the same, no update needs to be done */
! 	if (cp1 == &vp1->v_text[term.t_ncol])
  		return(TRUE);
  
  	/* find out if there is a match on the right */
  	nbflag = FALSE;

--- 705,714 -----
   * be hard operations that do a lot of update, so I don't really care.
   */
  	/* if both lines are the same, no update needs to be done */
! 	if (cp1 == &vp1->v_text[term.t_ncol]) {
! 		vp1->v_flag &= ~VFCHG;		/* flag this line is changed */
  		return(TRUE);
+  	}
  
 	/* find out if there is a match on the right */
  	nbflag = FALSE;
-------

Bill Carlson
wwc@ec.ecn.purdue.edu
ihnp4!pur-ee!wwc