aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/scroll_opt_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-04-28 13:34:07 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-02 13:11:47 +0200
commit9b9ccac62563326c1ad59a403aa89851a379ddbb (patch)
treeccf994b45adc9d98118c8017d156596a17723322 /test/functional/legacy/scroll_opt_spec.lua
parent6fd7e3bea4c38e79c77fe506a45781ffd17ebe4f (diff)
downloadrneovim-9b9ccac62563326c1ad59a403aa89851a379ddbb.tar.gz
rneovim-9b9ccac62563326c1ad59a403aa89851a379ddbb.tar.bz2
rneovim-9b9ccac62563326c1ad59a403aa89851a379ddbb.zip
vim-patch:9.0.1121: cursor positioning and display problems with 'smoothscroll'
Problem: Cursor positioning and display problems with 'smoothscroll' and using "zt", "zb" or "zz". Solution: Adjust computations and conditions. (Yee Cheng Chin, closes vim/vim#11764) https://github.com/vim/vim/commit/db4d88c2adfe8f8122341ac9d6cae27ef78451c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/scroll_opt_spec.lua')
-rw-r--r--test/functional/legacy/scroll_opt_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/legacy/scroll_opt_spec.lua b/test/functional/legacy/scroll_opt_spec.lua
index 31d851f571..e58b95ecc1 100644
--- a/test/functional/legacy/scroll_opt_spec.lua
+++ b/test/functional/legacy/scroll_opt_spec.lua
@@ -500,6 +500,34 @@ describe('smoothscroll', function()
exec('set scrolloff=0')
feed('0j')
screen:expect([[
+ <<<of text with lots of text with lots o|
+ f text with lots of text end |
+ ^four |
+ ~ |
+ ~ |
+ |
+ ]])
+ -- Test zt/zz/zb that they work properly when a long line is above it
+ 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 |
+ |
+ ]])
+ feed('zz')
+ screen:expect([[
+ <<<of text with lots of text with lots o|
+ f text with lots of text end |
+ ^four |
+ ~ |
+ ~ |
+ |
+ ]])
+ feed('zt')
+ screen:expect([[
^four |
~ |
~ |