diff options
Diffstat (limited to 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r-- | test/functional/legacy/scroll_opt_spec.lua | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 869763be3c..838ada4006 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -556,13 +556,13 @@ describe('smoothscroll', function() | ]]) -- Test zt/zz/zb that they work properly when a long line is above it - feed('zb') + feed('zt') screen:expect([[ - <<<th lots of text with lots of text wit| - h lots of text with lots of text with lo| - ts of text with lots of text with lots o| - f text with lots of text end | ^four | + ~ | + ~ | + ~ | + ~ | | ]]) feed('zz') @@ -574,13 +574,13 @@ describe('smoothscroll', function() ~ | | ]]) - feed('zt') + feed('zb') screen:expect([[ + <<<th lots of text with lots of text wit| + h lots of text with lots of text with lo| + ts of text with lots of text with lots o| + f text with lots of text end | ^four | - ~ | - ~ | - ~ | - ~ | | ]]) -- Repeat the step and move the cursor down again. @@ -588,15 +588,11 @@ describe('smoothscroll', function() -- than one window. Note that the cursor is at the bottom this time because -- Vim prefers to do so if we are scrolling a few lines only. exec("call setline(1, ['one', 'two', 'Line' .. (' with lots of text'->repeat(10)) .. ' end', 'four'])") + -- Currently visible lines were replaced, test that the lines and cursor + -- are correctly displayed. + screen:expect_unchanged() feed('3Gztj') - screen:expect([[ - <<<th lots of text with lots of text wit| - h lots of text with lots of text with lo| - ts of text with lots of text with lots o| - f text with lots of text end | - ^four | - | - ]]) + screen:expect_unchanged() -- Repeat the step but this time start it when the line is smooth-scrolled by -- one line. This tests that the offset calculation is still correct and -- still end up scrolling down to the next line with cursor at bottom of |