On 29/10/09 22:05, Bram Moolenaar wrote:
>
>
> 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]

According to ":help E326", and as confirmed by inspecting the source, 
swap files with any extension in the range .saa to .swp can be 
generated, which admittedly is many, maybe even _too_ many. Why not 
avoid generating swapfiles which Vim will never accept to recover 
without a rename, for instance by changing

            if (fname[n - 2] == 'a')    /* ".saa": tried enough, give up */

to

            if (fname[n - 2] == 'u')    /* ".sua": tried enough, give up */

at memline.c:4262 (as of Vim 7.2.302 sources)?

(The corresponding doc § is at recover.txt:50).



Best regards,
Tony.
-- 
Every program has two purposes -- one for which it was written and
another for which it wasn't.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to