chrisbra / Recover.vim

A Plugin to show a diff, whenever recovering a buffer
http://www.vim.org/scripts/script.php?script_id=3068
248 stars 25 forks source link

presenting unrelated swap file #25

Closed ghost closed 10 years ago

ghost commented 10 years ago

After loading a file after accidentally killing vim, recover presented me with an irrelevant swap file. swap 1 is correct, swap 2 is not.

Swap File '/Users/me/.vim/tmp/swap//%Users%me%project%btodo.txt.swp' found:
Swap files found:
    In directory ~/.vim/tmp/swap//:
1.     /%Users%me%project%btodo.txt.swp
...
        file name: ~me/projects/todo.txt
...
        user name: me   host name: macmini
...
2.    %Users%r.swp
...
        file name: ~me/tmp/scratch.txt
...
        user name: me   host name: macpro
Enter number of swap file to use (0 or quit):
chrisbra commented 10 years ago

On Sa, 08 Feb 2014, BugNot wrote:

After loading a file after accidentally killing vim, recover presented me with an irrelevant swap file. swap 1 is correct, swap 2 is not.

Swap File '/Users/me/.vim/tmp/swap//%Users%me%project%btodo.txt.swp' found:
Swap files found:
    In directory ~/.vim/tmp/swap//:
1.     /%Users%me%project%btodo.txt.swp
...
        file name: ~me/projects/todo.txt
...
        user name: me   host name: macmini
...
2.    %Users%r.swp
...
        file name: ~me/tmp/scratch.txt
...
        user name: me   host name: macpro
Enter number of swap file to use (0 or quit):

That might be a Vim bug. The recover plugin does not change, which swap files are presented to you by Vim.

Best,

Christian

The choice of approaches could be made the responsibility of the programmer. -- Larry Wall in 199709081901.MAA20863@wall.org