Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!bellcore!faline!scherzo!allegra!mit-eddie!uw-beaver!uw-june!entropy!dataio!bright From: bright@dataio.UUCP Newsgroups: net.sources Subject: More uEMACS Message-ID: <1269@dataio.Data-IO.COM> Date: Wed, 4-Mar-87 13:48:11 EST Article-I.D.: dataio.1269 Posted: Wed Mar 4 13:48:11 1987 Date-Received: Sat, 7-Mar-87 00:44:19 EST Organization: Data I/O - FutureNet Corp., Redmond, WA Lines: 34 This patch for microEMACS is for all you people who are sick of screen updates taking forever if you have more than one window on a buffer. The problem is that the old lchange() routine would force a hard update on all windows on the buffer. The new routine below only forces a hard update on those windows on the buffer that are not the currently active one. This usually about doubles the update speed. /* * This routine gets called when a character is changed in place in the current * buffer. It updates all of the required flags in the buffer and window * system. The flag used is passed as an argument; if the buffer is being * displayed in more than 1 window we change EDIT to HARD. Set MODE if the * mode line needs to be updated (the "*" has to be set). * Modified by Walter Bright to reduce update times. */ lchange(flag) register int flag; { register WINDOW *wp; if ((curbp->b_flag&BFCHG) == 0) /* First change, so */ { flag |= WFMODE; /* update mode lines. */ curbp->b_flag |= BFCHG; } for (wp = wheadp; wp; wp = wp->w_wndp) { if (wp->w_bufp == curbp) { wp->w_flag |= flag; if (wp != curwp) wp->w_flag |= WFHARD; } } }