>I've seen a similar problem running vi under SunOS 4.1. (SunOS 4.1 is >shipped with some System-V version of vi). System V Release 3.1, with assorted fixes to some bugs found at Sun (most of which, as I remember, were also in the 4.[23]BSD one), tag stack stuff added, and "modelines" renamed back to "modeline", 4.xBSD-style.