forked from aniani/vim
updated for version 7.1-201
This commit is contained in:
12
src/fileio.c
12
src/fileio.c
@@ -221,11 +221,12 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
|||||||
{
|
{
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
int newfile = (flags & READ_NEW);
|
int newfile = (flags & READ_NEW);
|
||||||
int set_options = newfile || (eap != NULL && eap->read_edit);
|
|
||||||
int check_readonly;
|
int check_readonly;
|
||||||
int filtering = (flags & READ_FILTER);
|
int filtering = (flags & READ_FILTER);
|
||||||
int read_stdin = (flags & READ_STDIN);
|
int read_stdin = (flags & READ_STDIN);
|
||||||
int read_buffer = (flags & READ_BUFFER);
|
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 */
|
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 */
|
colnr_T read_buf_col = 0; /* next char to read from this line */
|
||||||
char_u c;
|
char_u c;
|
||||||
@@ -650,8 +651,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
|
|||||||
|
|
||||||
if (set_options)
|
if (set_options)
|
||||||
{
|
{
|
||||||
curbuf->b_p_eol = TRUE;
|
/* Don't change 'eol' if reading from buffer as it will already be
|
||||||
curbuf->b_start_eol = TRUE;
|
* correctly set when reading stdin. */
|
||||||
|
if (!read_buffer)
|
||||||
|
{
|
||||||
|
curbuf->b_p_eol = TRUE;
|
||||||
|
curbuf->b_start_eol = TRUE;
|
||||||
|
}
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
curbuf->b_p_bomb = FALSE;
|
curbuf->b_p_bomb = FALSE;
|
||||||
curbuf->b_start_bomb = FALSE;
|
curbuf->b_start_bomb = FALSE;
|
||||||
|
|||||||
@@ -666,6 +666,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 */
|
||||||
|
/**/
|
||||||
|
201,
|
||||||
/**/
|
/**/
|
||||||
200,
|
200,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user