0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.781

Problem:    line2byte() returns one less when 'bin' and 'noeol' are set.
Solution:   Only adjust the size for the last line. (Rob Wu)
This commit is contained in:
Bram Moolenaar
2015-07-12 17:52:57 +02:00
parent 1db43b1145
commit fe6f186877
2 changed files with 3 additions and 1 deletions

View File

@@ -5362,7 +5362,7 @@ ml_find_line_or_offset(buf, lnum, offp)
size += lnum - 1; size += lnum - 1;
/* Don't count the last line break if 'bin' and 'noeol'. */ /* Don't count the last line break if 'bin' and 'noeol'. */
if (buf->b_p_bin && !buf->b_p_eol) if (buf->b_p_bin && !buf->b_p_eol && buf->b_ml.ml_line_count == lnum)
size -= ffdos + 1; size -= ffdos + 1;
} }

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
781,
/**/ /**/
780, 780,
/**/ /**/