Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!daemon From: DEC.BANKS@MARLBORO.DEC.COM Newsgroups: net.micro.amiga Subject: Hours of endless enjoyment from MicroEmacs, just for the asking (bug) Message-ID: <1797@caip.RUTGERS.EDU> Date: Fri, 11-Apr-86 02:29:55 EST Article-I.D.: caip.1797 Posted: Fri Apr 11 02:29:55 1986 Date-Received: Sat, 12-Apr-86 22:33:36 EST Sender: daemon@caip.RUTGERS.EDU Organization: Rutgers Univ., New Brunswick, N.J. Lines: 35 From: Dawn Banks I've tripped across a bug in the ditributed version of MicroEmacs wherein the editor will go into an infinite loop if you're trying to display a tab at the end of a screen line. Actually, this will happen with any display whose width is not evenly divisible by eight, which is the case with the Amiga MicroEmacs, at 77 characters per line. In Display.c, there are two occurances of: if (vtcol >= term.t_ncol) vp->v_text[term.t_ncol - 1] = '$'; else if (c == '\t') that most certainly should be replaced with something like if (vtcol >= term.t_ncol) { vtcol = (vtcol + 0x07) & ~0x07; vp->v_text[term.t_ncol - 1] = '$'; } else if (c == '\t') Of course there are better ways to fix this. What's happening is that the code that expands tabs keeps outputting spaces until vtcol is sitting at a tab stop (last three bits are zero). If you're at the end of the line, vtcol never gets incremented, and therefore never ends in three zeros, so we loop forever. {insert generic disclaimer here} Enjoy. D. Banks ARPA: DEC.BANKS@DEC-MARLORO.ARPA --------