Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 32208:73c5881c1793 v9.0.1435
patch 9.0.1435: scrolling too many lines when 'wrap' and 'diff' are set
Commit: https://github.com/vim/vim/commit/38d867f041349e1400c2cce9cac06f59ae6ccbb1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 1 19:54:40 2023 +0100
patch 9.0.1435: scrolling too many lines when 'wrap' and 'diff' are set
Problem: Scrolling too many lines when 'wrap' and 'diff' are set.
Solution: Only scroll by screenlines for 'diff' when 'wrap' is not set.
(closes #12211)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Apr 2023 21:00:04 +0200 |
parents | dbec60b8c253 |
children | 9c6bc59b6d80 |
comparison
equal
deleted
inserted
replaced
32207:d0e05f0e20b1 | 32208:73c5881c1793 |
---|---|
1586 call VerifyScreenDump(buf, 'Test_diff_scroll_2', {}) | 1586 call VerifyScreenDump(buf, 'Test_diff_scroll_2', {}) |
1587 | 1587 |
1588 call StopVimInTerminal(buf) | 1588 call StopVimInTerminal(buf) |
1589 endfunc | 1589 endfunc |
1590 | 1590 |
1591 " This was scrolling too many lines. | |
1592 func Test_diff_scroll_wrap_on() | |
1593 20new | |
1594 40vsplit | |
1595 call setline(1, map(range(1, 9), 'repeat(v:val, 200)')) | |
1596 setlocal number diff so=0 | |
1597 redraw | |
1598 normal! jj | |
1599 call assert_equal(1, winsaveview().topline) | |
1600 normal! j | |
1601 call assert_equal(2, winsaveview().topline) | |
1602 bwipe! | |
1603 bwipe! | |
1604 endfunc | |
1605 | |
1591 " This was trying to update diffs for a buffer being closed | 1606 " This was trying to update diffs for a buffer being closed |
1592 func Test_diff_only() | 1607 func Test_diff_only() |
1593 silent! lfile | 1608 silent! lfile |
1594 set diff | 1609 set diff |
1595 lopen | 1610 lopen |