vi: odd behaviour when editing files

Denys Vlasenko vda.linux at googlemail.com
Sat Dec 22 09:39:14 PST 2007


On Saturday 22 December 2007 10:20, Cristian Ionescu-Idbohrn wrote:
> On Fri, 21 Dec 2007, Denys Vlasenko wrote:
> > On Tuesday 18 December 2007 18:46, Cristian Ionescu-Idbohrn wrote:
> > > As I did not get any reaction on this post:
> > >
> > >   http://busybox.net/lists/busybox/2007-December/029525.html
> > >
> > > I'll start a new thread.  Please refer to the link above.
> > > Please find attached a minimal .config and a data file which can help
> > > reproduce the problem.  Edit that file and place the cursor on lines
> > > with length beyond 255 characters.  That will produce various
> > > artifacts, depending on the terminal (I tested xterm, aterm and pterm).
> >
> > Try this one.
>
> So I did.  Looks good.
>
> > It should support nearly arbitrarily long lines.
>
> Could you please be more specific on the "nearly" thing?

4 gigabyte long lines surely won't work.

10 megabyte lines seem to work (slowly):

$ dd if=/dev/zero bs=10M count=1 | tr '\000' x >line10m
1+0 records in
1+0 records out
10485760 bytes (10 MB) copied, 0.075066 seconds, 140 MB/s

$ echo >>line10m

$ cat line10m line10m line10m line10m >huge

$ ./busybox vi huge

> I gave vi just a light exercise (vi is not my favorite editor, but I have
> to use it some times).

Same here.

> I think we should ask more people with vi 
> expertise to give it a more testing.

Yup.
--
vda


More information about the busybox mailing list