From d5780e133a030d3ae4a4985264412bdca06746d7 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 9 May 2023 22:41:02 +0200 Subject: vim-patch:9.0.1533: test for 'smoothscroll' is ineffective Problem: Test for 'smoothscroll' is ineffective. Solution: Change the order of testing "zb" and "zt". (Luuk van Baal, closes vim/vim#12366) https://github.com/vim/vim/commit/6f37e530d3e2d58ff055723047bf91d91af2632c --- test/functional/legacy/scroll_opt_spec.lua | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'test/functional/legacy/scroll_opt_spec.lua') diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 869763be3c..e567d238b2 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([[ - <<repeat(10)) .. ' end', 'four'])") feed('3Gztj') - screen:expect([[ - << Date: Thu, 11 May 2023 20:37:49 +0200 Subject: vim-patch:9.0.1543: display errors when making topline shorter Problem: Display errors when making topline shorter and 'smoothscroll' is set. Solution: Reset w_skipcol when the topline becomes shorter than its current value. (Luuk van Baal, closes vim/vim#12367) https://github.com/vim/vim/commit/5d01f86d99bc3a3fd92d4f4e9338a9e78e9ebe16 --- test/functional/legacy/scroll_opt_spec.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/functional/legacy/scroll_opt_spec.lua') diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index e567d238b2..838ada4006 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -588,6 +588,9 @@ 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_unchanged() -- Repeat the step but this time start it when the line is smooth-scrolled by -- cgit