I've noticed for a while when diffing two versions of a file that
the two windows sometimes get out of sync.  I created and attached
two files that exhibit this problem.  For this example, I ran vim
version 8.2.5154 in an 80x24 xterm.

Steps to reproduce

 1. Save the attached files to disk.
 2. Start vim as

        $ vimdiff -N -u NONE -i NONE demo_left demo_right

    The display initially looks fine.
 3. Move the cursor to the right window:

        <C-W><C-W>

 4. Move the cursor down five lines:

        jjjjj

    Note that when the cursor reaches the fifth line 6, containing
    "Lorem", the left window scrolls to display common block one in
    roughly the center while the right window remains unchanged,
    like this.  (I removed eight columns from each window to make it
    fit in the width of a standard email page.)

      ------------------------------|  line 1
      ------------------------------|  line 2
      ------------------------------|  line 3
      ------------------------------|  line 4
      ------------------------------|
      ------------------------------|  Lorem
      ------------------------------|  ipsum
      ------------------------------|  dolor
      ------------------------------|  sit
      ------------------------------|  amet,
      // Common block               |  consectetur
      // one                        |  adipiscing
      // containing                 |  elit.
      // four lines                 |  Etiam
                                    |  luctus
      ------------------------------|  lectus
      ------------------------------|  sodales,
      ------------------------------|  dictum
      ------------------------------|  augue
      ------------------------------|  vel,
      ------------------------------|  molestie
      ------------------------------|  augue.
    demo_left         6,1        85% demo_right       6,1        Top

 5. Move the cursor down to the bottom of the window and one line
    more.  The right window scrolls one line as expected and the
    left window scrolls to align itself properly with the right
    window.

 6. Use the j key to move further down in the right buffer and more
    odd things happen, as when the cursor moves to line 39,
    containing "Vestibulum".  The left window scrolls to show the
    last 3 lines of common block one at the top and the first line
    of common block two at the bottom.

Expected behavior

    I expect the left window to remain in sync with the right
    window, displaying common buffer lines on the same screen line.

Version of Vim

    8.2.5154

Environment

 Operating system:  Ubuntu 20.04
 Terminal:  XTerm(370)
 Value of $TERM:  xterm-256color
 Shell:  bash 5.0.17(1)-release

Regards,
Gary

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220624013606.GA12539%40phoenix.
line 1
line 2
line 3
line 4

// Common block
// one
// containing
// four lines

// Common block
// two
// containing
// four lines
line 1
line 2
line 3
line 4

Lorem
ipsum
dolor
sit
amet,
consectetur
adipiscing
elit.
Etiam
luctus
lectus
sodales,
dictum
augue
vel,
molestie
augue.
Duis
sit
amet
rhoncus
justo.
Nullam
posuere
risus
semper
magna

// Common block
// one
// containing
// four lines

Vestibulum
tincidunt
aliquam
ipsum
id
venenatis.
Nam
nec
sollicitudin
justo.
Vestibulum
id
consequat
arcu,
a
aliquet
nulla.

// Common block
// two
// containing
// four lines

Raspunde prin e-mail lui