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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user