Wednesday, August 10, 2011

recovery wrongly deletes almost 300 lines from large files

Dear vim mailing list,

I have found a bug in vim's recovery.
To reproduce: create a file "test" with 40000 lines, with each line
containing 78 minuses, a la

78a-<ESC>
yy
39999p
:wq

Copy that file to test_save

Edit test again, add one line, do not do :w, but rather kill vim
(kill <PID>).
Do "vim test" again, press r for recovery, do :wq

The result is that the recovered file test does contain the newly added
line (good), but it misses 292 of the original lines (bad!) I.e.

wc test_save test
40000 40000 3160000 test_save
39707 39709 3136791 test

The above test has been done with vim 7.3 compiled on a 32 bit LINUX machine
and with vim 6.3.82 (from Kubuntu 10.10) on a 64 bit LINUX machine.

Cheers, Bo Milvang-Jensen

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: