John Beckett wrote:

Peter Palm wrote:

http://www.vim.org/scripts/script.php?script_id=1506.


Indeed, among other things, this disables the swap file for
'large' files, which should really speed up things.


I was going to report the following issue to vim-dev after I got
a chance to investigate it a little further, but it seems
appropriate to mention it now.

I did some work with a 3GB text file on Win32, using Vim 7.0 and
Dr.Chip's LargeFile.vim script from Tip 1506 above.

The result was really ugly. The script failed to notice that 3GB
was large because the Vim function getfsize(f) returned a
negative number.


Sounds like the filesize is getting stored in a 32bit signed number, and overflowing. Is the negative number -1 (that would mean "file can't be found")? If not, then perhaps that fact could be used to "extend" the LargeFile's ability to catch large files: trigger when getfsize() returns a number < -1. Please let me know what getfsize() is actually
returning when applied to that 3GB file.

Regards,
Chip Campbell

Reply via email to