4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When recovering a file, 'fileformat' is always the default, thus
12 writing the file may result in differences. (Penelope Fudd)
13 Solution: Before recovering the file try reading the original file to obtain
14 the values of 'fileformat', 'fileencoding', etc.
18 *** ../vim-6.2.199/src/memline.c Sun May 25 17:26:29 2003
19 --- src/memline.c Wed Jan 21 10:31:41 2004
23 while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
24 ml_delete((linenr_T)1, FALSE);
27 + * Try reading the original file to obtain the values of 'fileformat',
28 + * 'fileencoding', etc. Ignore errors. The text itself is not used.
30 + if (curbuf->b_ffname != NULL)
32 + (void)readfile(curbuf->b_ffname, NULL, (linenr_T)0,
33 + (linenr_T)0, (linenr_T)MAXLNUM, NULL, READ_NEW);
34 + while (!(curbuf->b_ml.ml_flags & ML_EMPTY))
35 + ml_delete((linenr_T)1, FALSE);
38 bnum = 1; /* start with block 1 */
39 page_count = 1; /* which is 1 page */
40 lnum = 0; /* append after line 0 in curbuf */
41 *** ../vim-6.2.199/src/version.c Sun Jan 25 19:40:26 2004
42 --- src/version.c Sun Jan 25 19:44:09 2004
46 { /* Add new patch number below this line */
52 SIGIRO -- irony detected (iron core dumped)
54 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
55 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
56 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
57 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///