|
Karsten Hopp |
f5c3d1 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
f5c3d1 |
Subject: Patch 7.1.201
|
|
Karsten Hopp |
f5c3d1 |
Fcc: outbox
|
|
Karsten Hopp |
f5c3d1 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
f5c3d1 |
Mime-Version: 1.0
|
|
Karsten Hopp |
f5c3d1 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
f5c3d1 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
f5c3d1 |
------------
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
Patch 7.1.201
|
|
Karsten Hopp |
f5c3d1 |
Problem: When reading stdin 'fenc' and 'ff are not set.
|
|
Karsten Hopp |
f5c3d1 |
Solution: Set the options after reading stdin. (Ben Schmidt)
|
|
Karsten Hopp |
f5c3d1 |
Files: src/fileio.c
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
*** ../vim-7.1.200/src/fileio.c Wed Jan 2 21:07:32 2008
|
|
Karsten Hopp |
f5c3d1 |
--- src/fileio.c Fri Jan 4 16:18:27 2008
|
|
Karsten Hopp |
f5c3d1 |
***************
|
|
Karsten Hopp |
f5c3d1 |
*** 221,231 ****
|
|
Karsten Hopp |
f5c3d1 |
{
|
|
Karsten Hopp |
f5c3d1 |
int fd = 0;
|
|
Karsten Hopp |
f5c3d1 |
int newfile = (flags & READ_NEW);
|
|
Karsten Hopp |
f5c3d1 |
- int set_options = newfile || (eap != NULL && eap->read_edit);
|
|
Karsten Hopp |
f5c3d1 |
int check_readonly;
|
|
Karsten Hopp |
f5c3d1 |
int filtering = (flags & READ_FILTER);
|
|
Karsten Hopp |
f5c3d1 |
int read_stdin = (flags & READ_STDIN);
|
|
Karsten Hopp |
f5c3d1 |
int read_buffer = (flags & READ_BUFFER);
|
|
Karsten Hopp |
f5c3d1 |
linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
|
|
Karsten Hopp |
f5c3d1 |
colnr_T read_buf_col = 0; /* next char to read from this line */
|
|
Karsten Hopp |
f5c3d1 |
char_u c;
|
|
Karsten Hopp |
f5c3d1 |
--- 221,232 ----
|
|
Karsten Hopp |
f5c3d1 |
{
|
|
Karsten Hopp |
f5c3d1 |
int fd = 0;
|
|
Karsten Hopp |
f5c3d1 |
int newfile = (flags & READ_NEW);
|
|
Karsten Hopp |
f5c3d1 |
int check_readonly;
|
|
Karsten Hopp |
f5c3d1 |
int filtering = (flags & READ_FILTER);
|
|
Karsten Hopp |
f5c3d1 |
int read_stdin = (flags & READ_STDIN);
|
|
Karsten Hopp |
f5c3d1 |
int read_buffer = (flags & READ_BUFFER);
|
|
Karsten Hopp |
f5c3d1 |
+ int set_options = newfile || read_buffer
|
|
Karsten Hopp |
f5c3d1 |
+ || (eap != NULL && eap->read_edit);
|
|
Karsten Hopp |
f5c3d1 |
linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
|
|
Karsten Hopp |
f5c3d1 |
colnr_T read_buf_col = 0; /* next char to read from this line */
|
|
Karsten Hopp |
f5c3d1 |
char_u c;
|
|
Karsten Hopp |
f5c3d1 |
***************
|
|
Karsten Hopp |
f5c3d1 |
*** 650,657 ****
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
if (set_options)
|
|
Karsten Hopp |
f5c3d1 |
{
|
|
Karsten Hopp |
f5c3d1 |
! curbuf->b_p_eol = TRUE;
|
|
Karsten Hopp |
f5c3d1 |
! curbuf->b_start_eol = TRUE;
|
|
Karsten Hopp |
f5c3d1 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
f5c3d1 |
curbuf->b_p_bomb = FALSE;
|
|
Karsten Hopp |
f5c3d1 |
curbuf->b_start_bomb = FALSE;
|
|
Karsten Hopp |
f5c3d1 |
--- 651,663 ----
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
if (set_options)
|
|
Karsten Hopp |
f5c3d1 |
{
|
|
Karsten Hopp |
f5c3d1 |
! /* Don't change 'eol' if reading from buffer as it will already be
|
|
Karsten Hopp |
f5c3d1 |
! * correctly set when reading stdin. */
|
|
Karsten Hopp |
f5c3d1 |
! if (!read_buffer)
|
|
Karsten Hopp |
f5c3d1 |
! {
|
|
Karsten Hopp |
f5c3d1 |
! curbuf->b_p_eol = TRUE;
|
|
Karsten Hopp |
f5c3d1 |
! curbuf->b_start_eol = TRUE;
|
|
Karsten Hopp |
f5c3d1 |
! }
|
|
Karsten Hopp |
f5c3d1 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
f5c3d1 |
curbuf->b_p_bomb = FALSE;
|
|
Karsten Hopp |
f5c3d1 |
curbuf->b_start_bomb = FALSE;
|
|
Karsten Hopp |
f5c3d1 |
*** ../vim-7.1.200/src/version.c Fri Jan 4 16:00:10 2008
|
|
Karsten Hopp |
f5c3d1 |
--- src/version.c Fri Jan 4 16:27:01 2008
|
|
Karsten Hopp |
f5c3d1 |
***************
|
|
Karsten Hopp |
f5c3d1 |
*** 668,669 ****
|
|
Karsten Hopp |
f5c3d1 |
--- 668,671 ----
|
|
Karsten Hopp |
f5c3d1 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
f5c3d1 |
+ /**/
|
|
Karsten Hopp |
f5c3d1 |
+ 201,
|
|
Karsten Hopp |
f5c3d1 |
/**/
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
--
|
|
Karsten Hopp |
f5c3d1 |
A mathematician is a device for turning coffee into theorems.
|
|
Karsten Hopp |
f5c3d1 |
Paul Erdos
|
|
Karsten Hopp |
f5c3d1 |
A computer programmer is a device for turning coffee into bugs.
|
|
Karsten Hopp |
f5c3d1 |
Bram Moolenaar
|
|
Karsten Hopp |
f5c3d1 |
|
|
Karsten Hopp |
f5c3d1 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
f5c3d1 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
f5c3d1 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
f5c3d1 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|