comparison src/testdir/test_diffmode.vim @ 29275:281509f1417b v8.2.5155

patch 8.2.5155: in diff mode windows may get out of sync Commit: https://github.com/vim/vim/commit/a315ce1f326b836167ca8b1037dafd93eb8d4d4e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 24 12:38:57 2022 +0100 patch 8.2.5155: in diff mode windows may get out of sync Problem: In diff mode windows may get out of sync. (Gary Johnson) Solution: Avoid that the other window scrolls for 'cursorbind'.
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Jun 2022 13:45:04 +0200
parents 27ae8ea82d7a
children bf4d7898cf93
comparison
equal deleted inserted replaced
29274:d314efe6447a 29275:281509f1417b
1533 1533
1534 %bw! 1534 %bw!
1535 set scrollbind& 1535 set scrollbind&
1536 endfunc 1536 endfunc
1537 1537
1538 " This was scrolling for 'cursorbind' but 'scrollbind' is more important
1539 func Test_diff_scroll()
1540 CheckScreendump
1541
1542 let left =<< trim END
1543 line 1
1544 line 2
1545 line 3
1546 line 4
1547
1548 // Common block
1549 // one
1550 // containing
1551 // four lines
1552
1553 // Common block
1554 // two
1555 // containing
1556 // four lines
1557 END
1558 call writefile(left, 'Xleft')
1559 let right =<< trim END
1560 line 1
1561 line 2
1562 line 3
1563 line 4
1564
1565 Lorem
1566 ipsum
1567 dolor
1568 sit
1569 amet,
1570 consectetur
1571 adipiscing
1572 elit.
1573 Etiam
1574 luctus
1575 lectus
1576 sodales,
1577 dictum
1578
1579 // Common block
1580 // one
1581 // containing
1582 // four lines
1583
1584 Vestibulum
1585 tincidunt
1586 aliquet
1587 nulla.
1588
1589 // Common block
1590 // two
1591 // containing
1592 // four lines
1593 END
1594 call writefile(right, 'Xright')
1595 let buf = RunVimInTerminal('-d Xleft Xright', {'rows': 12})
1596 call term_sendkeys(buf, "\<C-W>\<C-W>jjjj")
1597 call VerifyScreenDump(buf, 'Test_diff_scroll_1', {})
1598 call term_sendkeys(buf, "j")
1599 call VerifyScreenDump(buf, 'Test_diff_scroll_2', {})
1600
1601 call StopVimInTerminal(buf)
1602 call delete('Xleft')
1603 call delete('Xright')
1604 endfunc
1605
1606
1538 " vim: shiftwidth=2 sts=2 expandtab 1607 " vim: shiftwidth=2 sts=2 expandtab