Merge #3443 'vim-patch:7.4.{785,795,898}'

This commit is contained in:
Justin M. Keyes
2015-12-13 00:09:07 -05:00
13 changed files with 121 additions and 27 deletions

View File

@@ -3954,8 +3954,10 @@ long ml_find_line_or_offset(buf_T *buf, linenr_T lnum, long *offp)
if (ffdos)
size += lnum - 1;
/* Don't count the last line break if 'bin' and 'noeol'. */
if (buf->b_p_bin && !buf->b_p_eol && buf->b_ml.ml_line_count == lnum) {
/* Don't count the last line break if 'noeol' and ('bin' or
* 'nofixeol'). */
if ((!buf->b_p_fixeol || buf->b_p_bin) && !buf->b_p_eol
&& buf->b_ml.ml_line_count == lnum) {
size -= ffdos + 1;
}
}