Nikolai Weibull wrote: > On 8/16/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > Vim internally works linewise. Appending a character means taking the > > current line and replacing it with one that has the character appended. > > If you keep adding characters to the same line you could do some > > optimization to avoid having to allocate/free lines all the time. > > Bram, have you ever given any thought to using a gap > buffering-strategy for lines? This would make many operations on long > lines (a recurring issue discussed on this list) faster. It will > complicate the buffer handling a lot, though.
There are only a few operations that profit from a "gap" strategy. Overall it gets much more complicated and inefficient. You would have to move the gap around for every change made. -- hundred-and-one symptoms of being an internet addict: 155. You forget to eat because you're too busy surfing the net. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///