Mirror of the Vim source from https://github.com/vim/vim
Révision | 1f93fbcb4e0cf1dcd8682242f40aa5f2906c42ac (tree) |
---|---|
l'heure | 2008-01-05 00:31:21 |
Auteur | vimboss |
Commiter | vimboss |
updated for version 7.1-201
@@ -221,11 +221,12 @@ | ||
221 | 221 | { |
222 | 222 | int fd = 0; |
223 | 223 | int newfile = (flags & READ_NEW); |
224 | - int set_options = newfile || (eap != NULL && eap->read_edit); | |
225 | 224 | int check_readonly; |
226 | 225 | int filtering = (flags & READ_FILTER); |
227 | 226 | int read_stdin = (flags & READ_STDIN); |
228 | 227 | int read_buffer = (flags & READ_BUFFER); |
228 | + int set_options = newfile || read_buffer | |
229 | + || (eap != NULL && eap->read_edit); | |
229 | 230 | linenr_T read_buf_lnum = 1; /* next line to read from curbuf */ |
230 | 231 | colnr_T read_buf_col = 0; /* next char to read from this line */ |
231 | 232 | char_u c; |
@@ -650,8 +651,13 @@ | ||
650 | 651 | |
651 | 652 | if (set_options) |
652 | 653 | { |
653 | - curbuf->b_p_eol = TRUE; | |
654 | - curbuf->b_start_eol = TRUE; | |
654 | + /* Don't change 'eol' if reading from buffer as it will already be | |
655 | + * correctly set when reading stdin. */ | |
656 | + if (!read_buffer) | |
657 | + { | |
658 | + curbuf->b_p_eol = TRUE; | |
659 | + curbuf->b_start_eol = TRUE; | |
660 | + } | |
655 | 661 | #ifdef FEAT_MBYTE |
656 | 662 | curbuf->b_p_bomb = FALSE; |
657 | 663 | curbuf->b_start_bomb = FALSE; |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 201, | |
671 | +/**/ | |
670 | 672 | 200, |
671 | 673 | /**/ |
672 | 674 | 199, |