David M. Besonen wrote:
> win xp home sp3
> gvim 7.2
>
> issue: vim recovery will not work unless orphaned vim swap
> file extension begins with "sw"
>
>
> scenario:
>
> os crashes while gvim has a number of unnamed editing
> sessions opened
>
> after rebooting the os, i locate the orphaned vim swap file
>
> the file is named _.svz (windoze crashes a lot)
>
> when i attempt "vim -r _.svz" this message is returned:
> "E305: No swap file found for _.svz"
>
> i then change the filename to _.swz
> and issue the "vim -r _.swz" command
> and the file is recovered
>
> can anyone confirm this same behavior? and whether this is a
> bug or a feature?
It used to be a feature, but I can understand it can be annoying.
Let's extend the range of files recognized as a swap file to:
.s[uvw][a-z]
*** ../vim-7.2.267/src/memline.c 2009-04-22 15:56:27.000000000 +0200
--- src/memline.c 2009-10-29 20:55:08.000000000 +0100
***************
*** 864,884 ****
recoverymode = TRUE;
called_from_main = (curbuf->b_ml.ml_mfp == NULL);
attr = hl_attr(HLF_E);
! /*
! * If the file name ends in ".sw?" we use it directly.
! * Otherwise a search is done to find the swap file(s).
! */
fname = curbuf->b_fname;
if (fname == NULL) /* When there is no file name */
fname = (char_u *)"";
len = (int)STRLEN(fname);
if (len >= 4 &&
#if defined(VMS) || defined(RISCOS)
! STRNICMP(fname + len - 4, "_sw" , 3)
#else
! STRNICMP(fname + len - 4, ".sw" , 3)
#endif
! == 0)
{
directly = TRUE;
fname = vim_strsave(fname); /* make a copy for mf_open() */
--- 864,887 ----
recoverymode = TRUE;
called_from_main = (curbuf->b_ml.ml_mfp == NULL);
attr = hl_attr(HLF_E);
!
! /*
! * If the file name ends in ".s[uvw][a-z]" we assume this is the swap
file.
! * Otherwise a search is done to find the swap file(s).
! */
fname = curbuf->b_fname;
if (fname == NULL) /* When there is no file name */
fname = (char_u *)"";
len = (int)STRLEN(fname);
if (len >= 4 &&
#if defined(VMS) || defined(RISCOS)
! STRNICMP(fname + len - 4, "_s" , 2)
#else
! STRNICMP(fname + len - 4, ".s" , 2)
#endif
! == 0
! && vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL
! && ASCII_ISALPHA(fname[len - 1]))
{
directly = TRUE;
fname = vim_strsave(fname); /* make a copy for mf_open() */
--
TIM: To the north there lies a cave, the cave of Caerbannog, wherein, carved
in mystic runes, upon the very living rock, the last words of Olfin
Bedwere of Rheged make plain the last resting place of the most Holy
Grail.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---