summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-07-17 14:18:08 +0200
committerBram Moolenaar <Bram@vim.org>2015-07-17 14:18:08 +0200
commit34d72d4b6c1a2b04a214d8a49b7d22c97bc7a8bc (patch)
tree82675f2f5f49bcb04e8271de9fefee41b3c2ec19 /src/ops.c
parent2cf6938706ebcd20e4b4a6723f5f70568b26b1c6 (diff)
downloadvim-git-34d72d4b6c1a2b04a214d8a49b7d22c97bc7a8bc.tar.gz
patch 7.4.785v7.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)
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ops.c b/src/ops.c
index 7ad8222e1..3441f05dd 100644
--- 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)