Xref: utzoo unix-pc.bugs:41 comp.sys.att:4360 comp.unix.wizards:11386 Path: utzoo!utgpu!water!watmath!uunet!labrea!rutgers!mailrus!uflorida!gatech!rayssd!galaxia!dave From: dave@galaxia.zone1.com (David H. Brierley) Newsgroups: unix-pc.bugs,comp.sys.att,comp.unix.wizards Subject: Re: Weird problem with vi... "Not that many lines in buffer" Keywords: vi, bug Message-ID: <515@galaxia.zone1.com> Date: 28 Sep 88 02:03:04 GMT References: <508@icus.islp.ny.us> Reply-To: dave@galaxia.zone1.com (David H. Brierley) Organization: Dave's Very Own Personal System Lines: 27 In article <508@icus.islp.ny.us> lenny@icus.islp.ny.us (Lenny Tropiano) writes: >I just created this .signature file, and for some reason every time this >is in a file, and I do a "vi" of that file I get the following message... > >".signature" 4 lines of 300 characters Not that many lines in buffer >-- >lenny@icus.islp.ny.us Telex: 154232428 ICUS h: +1 (516) 968-8576 The problem is that vi sees the string "ex:" and assumes that whatever follows, up to the next colon, is to be interpreted as an ex (line mode) command. This behaviour is only exhibited in the first and last four lines of the file. What is happenning in this case is that vi is attempting to interpret "154232428" as a line number! I would assume that you dont have that many lines in your file, hence the diagnostic is informing you of that fact. The most common use of these "mode lines" that I have seen is to specify various options that are unique to the file, i.e. wm=72 sw=4 ts=4 etc. One thing that can cause great confusion when using mode lines is that not only is the string "ex:" recognized, so are the strings "vi:", "vx:", and "ei:". I know of several source sites (mine included) that have modified vi so that mode lines are ignored by default and you have to take special action to get the editor to honor them. Not only can they cause confusion, as they did in this case, they are also a potential security hole. -- David H. Brierley Home: dave@galaxia.zone1.com ...!rayssd!galaxia!dave Work: dhb@rayssd.ray.com {sun,decuac,gatech,necntc,ukma}!rayssd!dhb