]>
Commit | Line | Data |
---|---|---|
9b411fd1 ER |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.0.181 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.0.181 | |
11 | Problem: When reloading a file that starts with an empty line, the reloaded | |
12 | buffer has an extra empty line at the end. (Motty Lentzitzky) | |
13 | Solution: Delete all lines, don't use bufempty(). | |
14 | Files: src/fileio.c | |
15 | ||
16 | ||
17 | *** ../vim-7.0.180/src/fileio.c Thu Oct 12 21:15:04 2006 | |
18 | --- src/fileio.c Tue Jan 9 15:38:13 2007 | |
19 | *************** | |
20 | *** 6178,6185 **** | |
21 | if (retval != FAIL) | |
22 | { | |
23 | curbuf = frombuf; | |
24 | ! while (!bufempty()) | |
25 | ! if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL) | |
26 | { | |
27 | /* Oops! We could try putting back the saved lines, but that | |
28 | * might fail again... */ | |
29 | --- 6179,6186 ---- | |
30 | if (retval != FAIL) | |
31 | { | |
32 | curbuf = frombuf; | |
33 | ! for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum) | |
34 | ! if (ml_delete(lnum, FALSE) == FAIL) | |
35 | { | |
36 | /* Oops! We could try putting back the saved lines, but that | |
37 | * might fail again... */ | |
38 | *** ../vim-7.0.180/src/version.c Tue Jan 9 15:15:36 2007 | |
39 | --- src/version.c Tue Jan 9 15:41:55 2007 | |
40 | *************** | |
41 | *** 668,669 **** | |
42 | --- 668,671 ---- | |
43 | { /* Add new patch number below this line */ | |
44 | + /**/ | |
45 | + 181, | |
46 | /**/ | |
47 | ||
48 | -- | |
49 | hundred-and-one symptoms of being an internet addict: | |
50 | 11. You find yourself typing "com" after every period when using a word | |
51 | processor.com | |
52 | ||
53 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
54 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
55 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
56 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |