summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-01-04 15:31:21 +0000
committerBram Moolenaar <Bram@vim.org>2008-01-04 15:31:21 +0000
commit690ffc03849a8eee867a584c04b9282007928c14 (patch)
tree492cb4078ea2ed95a43de864d282dbb53e25b0a4
parent383c6f557991dc0fa9e8974f652bd5f6af3289b1 (diff)
downloadvim-git-690ffc03849a8eee867a584c04b9282007928c14.tar.gz
updated for version 7.1-201v7.1.201
-rw-r--r--src/fileio.c12
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c
index bcf355250..40905cfea 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -221,11 +221,12 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
{
int fd = 0;
int newfile = (flags & READ_NEW);
- int set_options = newfile || (eap != NULL && eap->read_edit);
int check_readonly;
int filtering = (flags & READ_FILTER);
int read_stdin = (flags & READ_STDIN);
int read_buffer = (flags & READ_BUFFER);
+ int set_options = newfile || read_buffer
+ || (eap != NULL && eap->read_edit);
linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
colnr_T read_buf_col = 0; /* next char to read from this line */
char_u c;
@@ -650,8 +651,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
if (set_options)
{
- curbuf->b_p_eol = TRUE;
- curbuf->b_start_eol = TRUE;
+ /* Don't change 'eol' if reading from buffer as it will already be
+ * correctly set when reading stdin. */
+ if (!read_buffer)
+ {
+ curbuf->b_p_eol = TRUE;
+ curbuf->b_start_eol = TRUE;
+ }
#ifdef FEAT_MBYTE
curbuf->b_p_bomb = FALSE;
curbuf->b_start_bomb = FALSE;
diff --git a/src/version.c b/src/version.c
index c8c8834f4..ce1392417 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 201,
+/**/
200,
/**/
199,