From 69af5e8782e601fe9c1e39adf49ce16728719a73 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Wed, 26 Apr 2023 04:00:38 +0200 Subject: vim-patch:9.0.0645: CTRL-Y does not stop at line 1 Problem: CTRL-Y does not stop at line 1. (John Marriott) Solution: Stop at line 1 when 'smoothscroll' is not set. (closes vim/vim#11261) https://github.com/vim/vim/commit/8df9748edb2ac8bd025e34e06194ac210667c97a Co-authored-by: Bram Moolenaar --- test/functional/legacy/scroll_opt_spec.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/functional') diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua index 0d0e9640a7..14dbe0caf9 100644 --- a/test/functional/legacy/scroll_opt_spec.lua +++ b/test/functional/legacy/scroll_opt_spec.lua @@ -14,6 +14,19 @@ describe('smoothscroll', function() screen:attach() end) + -- oldtest: Test_CtrlE_CtrlY_stop_at_end() + it('disabled does not break and stop at end', function() + exec([[ + enew + call setline(1, ['one', 'two']) + set number + ]]) + feed('') + screen:expect({any = " 1 ^one"}) + feed('') + screen:expect({any = " 2 ^two"}) + end) + -- oldtest: Test_smoothscroll_CtrlE_CtrlY() it('works with and ', function() exec([[ -- cgit