On 11/1/06, Ryan Phillips <[EMAIL PROTECTED]> wrote:
I have just noticed a problem with bufnext and bufprev with two
(plus+) different files open within (g)vim.

Attached my vim --version for review.

OS: Linux, Ubuntu Edgy

Steps to reproduce:
    * Create a file ~140 lines long with A'S, TEST_A
    * cp TEST_A TEST_A_2
    * vim TEST_A TEST_A_2 --noplugins
    * In buf #1 scroll to a line number > 30.  I selected 38 to be at
      the top of my terminal. (I have line numbers turned on)
    * :bn   # to go to TEST_A_2
    * :bp   # to return to Buf #1

The first buffer has jumped N lines forward within the file.  N
appears to be a constant 22 for me.  Can anyone else reproduce this?

If I try your testcase with 'vim -u NONE', then current line
becomes vertically centered around after :bn,:bp. The current
line number is not changed, but the screen visual line is changed.

The autocommand trick to disable this jumping was posted
couple of months ago on this list.

Another option to disable this jumping is to use
'set scrolloff=999'.

Yakov

Reply via email to