updated for version 7.0012

This commit is contained in:
Bram Moolenaar
2004-07-26 12:53:41 +00:00
parent 89cb5e0f64
commit 5eb86f9199
42 changed files with 1362 additions and 648 deletions

View File

@ -4338,8 +4338,17 @@ ml_find_line_or_offset(buf, line, offp)
curline = buf->b_ml.ml_locked_high + 1;
}
if (ffdos)
size += line - 1;
if (line != 0)
{
/* Count extra CR characters. */
if (ffdos)
size += line - 1;
/* Don't count the last line break if 'bin' and 'noeol'. */
if (buf->b_p_bin && !buf->b_p_eol)
size -= ffdos + 1;
}
return size;
}