Thanks for the patch Martin. One thing I'd like to point out. > +// b->mxlines - count of lines in b > +// so add one more line at the end of buffer // is a C++ comment. Although gcc suports it, other compilers may not. Try to stick to ANSI C. Dennis Payne dulsi@identicalsoftware.com