aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-04-26 16:54:23 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-02 13:11:46 +0200
commit8e4a4629cab3377ba6fd5e291cf5f17fb4ff8a5c (patch)
tree75a5c8a1bac2d03f0ece26268834f86b6d97c336 /test/functional
parent181097e4434bbbd7482fd238a67c1e65f002e3ff (diff)
downloadrneovim-8e4a4629cab3377ba6fd5e291cf5f17fb4ff8a5c.tar.gz
rneovim-8e4a4629cab3377ba6fd5e291cf5f17fb4ff8a5c.tar.bz2
rneovim-8e4a4629cab3377ba6fd5e291cf5f17fb4ff8a5c.zip
vim-patch:9.0.0671: negative topline using CTRL-Y with 'smoothscroll' and 'diff'
Problem: Negative topline using CTRL-Y with 'smoothscroll' and 'diff'. (Ernie Rael) Solution: Only use 'smoothscroll' when 'wrap' is set. https://github.com/vim/vim/commit/1a58e1d97cfc72e501cbf63ad75f46f1bb4c8da2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index 8d2eade1a8..90417d93f3 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -272,4 +272,33 @@ describe('smoothscroll', function()
|
]])
end)
+
+ -- oldtest: Test_smoothscroll_diff_mode()
+ it("works with diff mode", function()
+ screen:try_resize(40, 8)
+ exec([[
+ let text = 'just some text here'
+ call setline(1, text)
+ set smoothscroll
+ diffthis
+ new
+ call setline(1, text)
+ set smoothscroll
+ diffthis
+ ]])
+ screen:expect([[
+ - ^just some text here |
+ ~ |
+ ~ |
+ [No Name] [+] |
+ - just some text here |
+ ~ |
+ [No Name] [+] |
+ |
+ ]])
+ feed('<C-Y>')
+ screen:expect_unchanged()
+ feed('<C-E>')
+ screen:expect_unchanged()
+ end)
end)