From 3a1973debceca29e65c4f7c83d025cb3314ebaf2 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Wed, 26 Apr 2023 17:08:35 +0200 Subject: vim-patch:9.0.0672: line partly shows with 'smoothscroll' and 'scrolloff' zero Problem: Cursor line only partly shows with 'smoothscroll' and 'scrolloff' zero. Solution: Do not use 'smoothscroll' when adjusting the bottom of the window. (closes vim/vim#11269) https://github.com/vim/vim/commit/9bab7a024393200bb2c03b3abddfda86436990a7 Co-authored-by: Bram Moolenaar --- test/functional/legacy/scroll_opt_spec.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/functional') diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 90417d93f3..c63401cb02 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -301,4 +301,30 @@ describe('smoothscroll', function() feed('') screen:expect_unchanged() end) + + -- oldtest: Test_smoothscroll_wrap_scrolloff_zero() + it("works with zero 'scrolloff'", function() + screen:try_resize(40, 8) + exec([[ + call setline(1, ['Line' .. (' with some text'->repeat(7))]->repeat(7)) + set smoothscroll scrolloff=0 + :3 + ]]) + screen:expect([[ + <<j') + screen:expect_unchanged() + feed('G') + screen:expect_unchanged() + end) end) -- cgit