3 minor 'vi' bugs.

Jeff Gilliam jeff at voder.UUCP
Thu Jul 12 16:51:48 AEST 1984


>   Try this: vi a file, type '^F', then '100^B', then '^G'. If
>everything still looks normal, try a few more '100^B'.
>   Now try that one:  ':set ht=0'.
>   Finally, try ':set sw=0', then open a new line and type '^D'.
>
>   The first bug is in the CTRL(b) case of vmain(), line ~= 425 in
>ex_vmain.c. There are some parentheses missing in the address ...
>
>	/* original code */
>	addr = dot - vcline - 2 + (cnt-1)*basWLINES;
>	/* modified code */
>	addr = dot - ((vcline - 2) + (cnt-1)*basWLINES);

I'll have to take exception to this; the correctly modified line
should be:

	addr = dot - vcline - 2 - (cnt-1)*basWLINES;

After making this change try the following to verify it really
works:

	vi somefile
	10^F			(move forward 10 screens full)
	10^B			(you should be right back at line 1)
	.
	.
	.

Regarding your second and third bugs: they're fixed in 4.2 (with
exactly the same code you suggest).

Jeff "No clever signature line yet" Gilliam



More information about the Net.bugs mailing list