Karsten Hopp c4740e
To: vim-dev@vim.org
Karsten Hopp c4740e
Subject: Patch 7.2.272
Karsten Hopp c4740e
Fcc: outbox
Karsten Hopp c4740e
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp c4740e
Mime-Version: 1.0
Karsten Hopp c4740e
Content-Type: text/plain; charset=UTF-8
Karsten Hopp c4740e
Content-Transfer-Encoding: 8bit
Karsten Hopp c4740e
------------
Karsten Hopp c4740e
Karsten Hopp c4740e
Patch 7.2.272
Karsten Hopp c4740e
Problem:    "_.svz" is not recognized as a swap file. (David M. Besonen)
Karsten Hopp c4740e
Solution:   Accept .s[uvw][a-z] as a swap file name extension.
Karsten Hopp c4740e
Files:	    src/memline.c
Karsten Hopp c4740e
Karsten Hopp c4740e
Karsten Hopp c4740e
*** ../vim-7.2.271/src/memline.c	2009-04-22 15:56:27.000000000 +0200
Karsten Hopp c4740e
--- src/memline.c	2009-10-29 20:55:08.000000000 +0100
Karsten Hopp c4740e
***************
Karsten Hopp c4740e
*** 864,884 ****
Karsten Hopp c4740e
      recoverymode = TRUE;
Karsten Hopp c4740e
      called_from_main = (curbuf->b_ml.ml_mfp == NULL);
Karsten Hopp c4740e
      attr = hl_attr(HLF_E);
Karsten Hopp c4740e
! /*
Karsten Hopp c4740e
!  * If the file name ends in ".sw?" we use it directly.
Karsten Hopp c4740e
!  * Otherwise a search is done to find the swap file(s).
Karsten Hopp c4740e
!  */
Karsten Hopp c4740e
      fname = curbuf->b_fname;
Karsten Hopp c4740e
      if (fname == NULL)		    /* When there is no file name */
Karsten Hopp c4740e
  	fname = (char_u *)"";
Karsten Hopp c4740e
      len = (int)STRLEN(fname);
Karsten Hopp c4740e
      if (len >= 4 &&
Karsten Hopp c4740e
  #if defined(VMS) || defined(RISCOS)
Karsten Hopp c4740e
! 	    STRNICMP(fname + len - 4, "_sw" , 3)
Karsten Hopp c4740e
  #else
Karsten Hopp c4740e
! 	    STRNICMP(fname + len - 4, ".sw" , 3)
Karsten Hopp c4740e
  #endif
Karsten Hopp c4740e
! 		== 0)
Karsten Hopp c4740e
      {
Karsten Hopp c4740e
  	directly = TRUE;
Karsten Hopp c4740e
  	fname = vim_strsave(fname); /* make a copy for mf_open() */
Karsten Hopp c4740e
--- 864,887 ----
Karsten Hopp c4740e
      recoverymode = TRUE;
Karsten Hopp c4740e
      called_from_main = (curbuf->b_ml.ml_mfp == NULL);
Karsten Hopp c4740e
      attr = hl_attr(HLF_E);
Karsten Hopp c4740e
! 
Karsten Hopp c4740e
!     /*
Karsten Hopp c4740e
!      * If the file name ends in ".s[uvw][a-z]" we assume this is the swap file.
Karsten Hopp c4740e
!      * Otherwise a search is done to find the swap file(s).
Karsten Hopp c4740e
!      */
Karsten Hopp c4740e
      fname = curbuf->b_fname;
Karsten Hopp c4740e
      if (fname == NULL)		    /* When there is no file name */
Karsten Hopp c4740e
  	fname = (char_u *)"";
Karsten Hopp c4740e
      len = (int)STRLEN(fname);
Karsten Hopp c4740e
      if (len >= 4 &&
Karsten Hopp c4740e
  #if defined(VMS) || defined(RISCOS)
Karsten Hopp c4740e
! 	    STRNICMP(fname + len - 4, "_s" , 2)
Karsten Hopp c4740e
  #else
Karsten Hopp c4740e
! 	    STRNICMP(fname + len - 4, ".s" , 2)
Karsten Hopp c4740e
  #endif
Karsten Hopp c4740e
! 		== 0
Karsten Hopp c4740e
! 		&& vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL
Karsten Hopp c4740e
! 		&& ASCII_ISALPHA(fname[len - 1]))
Karsten Hopp c4740e
      {
Karsten Hopp c4740e
  	directly = TRUE;
Karsten Hopp c4740e
  	fname = vim_strsave(fname); /* make a copy for mf_open() */
Karsten Hopp c4740e
*** ../vim-7.2.271/src/version.c	2009-11-03 12:53:44.000000000 +0100
Karsten Hopp c4740e
--- src/version.c	2009-11-03 13:02:51.000000000 +0100
Karsten Hopp c4740e
***************
Karsten Hopp c4740e
*** 678,679 ****
Karsten Hopp c4740e
--- 678,681 ----
Karsten Hopp c4740e
  {   /* Add new patch number below this line */
Karsten Hopp c4740e
+ /**/
Karsten Hopp c4740e
+     272,
Karsten Hopp c4740e
  /**/
Karsten Hopp c4740e
Karsten Hopp c4740e
-- 
Karsten Hopp c4740e
Sorry, no fortune today.
Karsten Hopp c4740e
Karsten Hopp c4740e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp c4740e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp c4740e
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp c4740e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///