Sorry, I forgot to check for plugins. I get no corruption when no plugins are
loaded.
The following shows how to reproduce the corruption from scratch.
In a temp directory, make file auto.vim as follows.
--- Start of auto.vim ---
" Simplified LargeFile.vim
augroup LargeFile
au BufReadPre *
\ let f=expand("<afile>") |
\ if getfsize(f) >= 100*1024*1024 |
\ let b:eikeep= &ei |
\ let b:ulkeep= &ul |
\ set ei=FileType |
\ setlocal noswf bh=unload |
\ let f=escape(substitute(f,'\','/','g'),' ') |
\ exe "au LargeFile BufEnter ".f." set ul=-1" |
\ exe "au LargeFile BufLeave ".f." let &ul=".b:ulkeep."|set ei=".b:eikeep |
\ exe "au LargeFile BufUnload ".f." au! LargeFile * ". f |
\ echomsg "***note*** handling a large file" |
\ endif
augroup END
--- end ---
Execute the following two lines in Vim to create the big file in the temp
directory:
:let x = [repeat('a',20), repeat('b',25), repeat('c',30), repeat('d',35),
repeat('e',40)]
:call writefile(repeat(x, 1000000), 'big.tmp')
In the temp directory, start Vim with no plugins:
vim -N -u NONE -i NONE
Execute the following commands:
:source auto.vim
:e big.tmp
:1,20000y
:vnew
:put
:%s/.*/\=strlen(submatch(0)) . "\t" . submatch(0)/
:nohlsearch
Sorting the buffer shows obvious corruption (many blank lines and junk):
:sort
John
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.