Ответ на сообщение «Re: Error: E315, keepjumps, scrolloff», 
присланное в 20:02:04 20 февраля 2010, Суббота,
отправитель Dominique Pellé:

I have this bug too. Completely automated way to reproduce with "vim -u NONE":
copy all attached files to one folder and run "sh bug.sh". Vim-7.2.303, Gentoo.

Текст сообщения:
> Marko Mahnič wrote:
> > Error: E315, keepjumps, scrolloff
> >
> > " To Reproduce:
> > " Add this file to plugins; start Vim.
> > " Open file A (eg. 100) lines and B (eg. 200) lines
> > " Do G on both files
> > " When switching from B to A (longer to shorter) the message
> > " It's a bug ... should appear (in :messages)
> > "
> > " The error caught is E315 on the line 'let toppos=line('.')
> > "
> > " The (funny) solution is:
> > "   let &scrolloff=&scrolloff
> > " (see the code below)
> >
> > set scrolloff=3
> > function! ScrollOffBug()
> >   echom "ScrollOffBug?"
> >   " Solution:
> >   " let &scrolloff=&scrolloff
> >   try
> >      let pos = line('.')
> >      " error happens next:
> >      keepjumps norm! H
> >      let toppos = line('.')
> >    catch /.*/
> >       echom "It's a bug b=" . bufnr('%') . ", so=" . &scrolloff
> >    endtry
> > endfunc
> >
> > au BufEnter * call ScrollOffBug()
> 
> I'm not able to reproduce the bug you describe using
> Vim-7.2.368 on Linux.   I see "ScrollOffBug?" but I never
> see "It's a bug".
> 
> Which version of Vim are you using?
> 
> We may have different settings in ~/.vimrc.  So
> can you try to reproduce it with "vim -u NONE"
> and completely automate the way to reproduce it?
> 
> Thanks
> -- Dominique
> 
set scrolloff=3
function! ScrollOffBug()
   echom "ScrollOffBug?"
   " Solution:
   " let &scrolloff=&scrolloff
   try
      let pos = line('.')
      " error happens next:
      keepjumps norm! H
      let toppos = line('.')
    catch /.*/
       call writefile(["It's a bug b=" . bufnr('%') . ", so=" . &scrolloff],
                   \"testoutput")
    endtry
endfunc

au BufEnter * call ScrollOffBug()
"{{{
    abc
"}}}
set nocompatible
set foldmethod=marker
"{{{
    abc
"}}}
"{{{
    def
"}}}

Attachment: bug.sh
Description: application/shellscript

Attachment: signature.asc
Description: This is a digitally signed message part.

Raspunde prin e-mail lui