|
Karsten Hopp |
9d173f |
To: vim-dev@vim.org
|
|
Karsten Hopp |
9d173f |
Subject: patch 7.0.181
|
|
Karsten Hopp |
9d173f |
Fcc: outbox
|
|
Karsten Hopp |
9d173f |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
9d173f |
Mime-Version: 1.0
|
|
Karsten Hopp |
9d173f |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
9d173f |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
9d173f |
------------
|
|
Karsten Hopp |
9d173f |
|
|
Karsten Hopp |
9d173f |
Patch 7.0.181
|
|
Karsten Hopp |
9d173f |
Problem: When reloading a file that starts with an empty line, the reloaded
|
|
Karsten Hopp |
9d173f |
buffer has an extra empty line at the end. (Motty Lentzitzky)
|
|
Karsten Hopp |
9d173f |
Solution: Delete all lines, don't use bufempty().
|
|
Karsten Hopp |
9d173f |
Files: src/fileio.c
|
|
Karsten Hopp |
9d173f |
|
|
Karsten Hopp |
9d173f |
|
|
Karsten Hopp |
9d173f |
*** ../vim-7.0.180/src/fileio.c Thu Oct 12 21:15:04 2006
|
|
Karsten Hopp |
9d173f |
--- src/fileio.c Tue Jan 9 15:38:13 2007
|
|
Karsten Hopp |
9d173f |
***************
|
|
Karsten Hopp |
9d173f |
*** 6178,6185 ****
|
|
Karsten Hopp |
9d173f |
if (retval != FAIL)
|
|
Karsten Hopp |
9d173f |
{
|
|
Karsten Hopp |
9d173f |
curbuf = frombuf;
|
|
Karsten Hopp |
9d173f |
! while (!bufempty())
|
|
Karsten Hopp |
9d173f |
! if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL)
|
|
Karsten Hopp |
9d173f |
{
|
|
Karsten Hopp |
9d173f |
/* Oops! We could try putting back the saved lines, but that
|
|
Karsten Hopp |
9d173f |
* might fail again... */
|
|
Karsten Hopp |
9d173f |
--- 6179,6186 ----
|
|
Karsten Hopp |
9d173f |
if (retval != FAIL)
|
|
Karsten Hopp |
9d173f |
{
|
|
Karsten Hopp |
9d173f |
curbuf = frombuf;
|
|
Karsten Hopp |
9d173f |
! for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
|
|
Karsten Hopp |
9d173f |
! if (ml_delete(lnum, FALSE) == FAIL)
|
|
Karsten Hopp |
9d173f |
{
|
|
Karsten Hopp |
9d173f |
/* Oops! We could try putting back the saved lines, but that
|
|
Karsten Hopp |
9d173f |
* might fail again... */
|
|
Karsten Hopp |
9d173f |
*** ../vim-7.0.180/src/version.c Tue Jan 9 15:15:36 2007
|
|
Karsten Hopp |
9d173f |
--- src/version.c Tue Jan 9 15:41:55 2007
|
|
Karsten Hopp |
9d173f |
***************
|
|
Karsten Hopp |
9d173f |
*** 668,669 ****
|
|
Karsten Hopp |
9d173f |
--- 668,671 ----
|
|
Karsten Hopp |
9d173f |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
9d173f |
+ /**/
|
|
Karsten Hopp |
9d173f |
+ 181,
|
|
Karsten Hopp |
9d173f |
/**/
|
|
Karsten Hopp |
9d173f |
|
|
Karsten Hopp |
9d173f |
--
|
|
Karsten Hopp |
9d173f |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
9d173f |
11. You find yourself typing "com" after every period when using a word
|
|
Karsten Hopp |
9d173f |
processor.com
|
|
Karsten Hopp |
9d173f |
|
|
Karsten Hopp |
9d173f |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
9d173f |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
9d173f |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
9d173f |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|