4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When reading stdin 'fenc' and 'ff are not set.
12 Solution: Set the options after reading stdin. (Ben Schmidt)
16 *** ../vim-7.1.200/src/fileio.c Wed Jan 2 21:07:32 2008
17 --- src/fileio.c Fri Jan 4 16:18:27 2008
22 int newfile = (flags & READ_NEW);
23 - int set_options = newfile || (eap != NULL && eap->read_edit);
25 int filtering = (flags & READ_FILTER);
26 int read_stdin = (flags & READ_STDIN);
27 int read_buffer = (flags & READ_BUFFER);
28 linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
29 colnr_T read_buf_col = 0; /* next char to read from this line */
34 int newfile = (flags & READ_NEW);
36 int filtering = (flags & READ_FILTER);
37 int read_stdin = (flags & READ_STDIN);
38 int read_buffer = (flags & READ_BUFFER);
39 + int set_options = newfile || read_buffer
40 + || (eap != NULL && eap->read_edit);
41 linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
42 colnr_T read_buf_col = 0; /* next char to read from this line */
49 ! curbuf->b_p_eol = TRUE;
50 ! curbuf->b_start_eol = TRUE;
52 curbuf->b_p_bomb = FALSE;
53 curbuf->b_start_bomb = FALSE;
58 ! /* Don't change 'eol' if reading from buffer as it will already be
59 ! * correctly set when reading stdin. */
62 ! curbuf->b_p_eol = TRUE;
63 ! curbuf->b_start_eol = TRUE;
66 curbuf->b_p_bomb = FALSE;
67 curbuf->b_start_bomb = FALSE;
68 *** ../vim-7.1.200/src/version.c Fri Jan 4 16:00:10 2008
69 --- src/version.c Fri Jan 4 16:27:01 2008
73 { /* Add new patch number below this line */
79 A mathematician is a device for turning coffee into theorems.
81 A computer programmer is a device for turning coffee into bugs.
84 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
85 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
86 \\\ download, build and distribute -- http://www.A-A-P.org ///
87 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///