Mercurial > vim
diff src/ops.c @ 6933:62ba356c2d4e v7.4.785
patch 7.4.785
Problem: On some systems automatically adding the missing EOL causes
problems. Setting 'binary' has too many side effects.
Solution: Add the 'fixeol' option, default on. (Pavel Samarkin)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 17 Jul 2015 14:18:08 +0200 |
parents | e55929fca0cf |
children | d19e79d29bf9 |
line wrap: on
line diff
--- a/src/ops.c +++ b/src/ops.c @@ -7052,7 +7052,7 @@ cursor_pos_info() &char_count_cursor, len, eol_size); if (lnum == curbuf->b_ml.ml_line_count && !curbuf->b_p_eol - && curbuf->b_p_bin + && (curbuf->b_p_bin || !curbuf->b_p_fixeol) && (long)STRLEN(s) < len) byte_count_cursor -= eol_size; } @@ -7076,7 +7076,7 @@ cursor_pos_info() } /* Correction for when last line doesn't have an EOL. */ - if (!curbuf->b_p_eol && curbuf->b_p_bin) + if (!curbuf->b_p_eol && (curbuf->b_p_bin || !curbuf->b_p_fixeol)) byte_count -= eol_size; if (VIsual_active)