aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/put_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-02 08:48:49 +0800
committerGitHub <noreply@github.com>2023-06-02 08:48:49 +0800
commit9f3c4c152664b21593636a59ce21e74ab7000b20 (patch)
tree7e169b08d198fe6f4b0115c9c130aebdff89af9f /test/functional/legacy/put_spec.lua
parenta0375b68c1803e7453071a20b28249020abe7260 (diff)
downloadrneovim-9f3c4c152664b21593636a59ce21e74ab7000b20.tar.gz
rneovim-9f3c4c152664b21593636a59ce21e74ab7000b20.tar.bz2
rneovim-9f3c4c152664b21593636a59ce21e74ab7000b20.zip
vim-patch:9.0.1597: cursor ends up below the window after a put (#23873)
Problem: Cursor ends up below the window after a put. Solution: Mark w_crow and w_botline invalid when changing the cursor line. (closes vim/vim#12465) https://github.com/vim/vim/commit/8509014adda188ee8bdf6a2e123fbf15a91b29d2 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/put_spec.lua')
-rw-r--r--test/functional/legacy/put_spec.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua
index e83fde774a..4a42a1c8a3 100644
--- a/test/functional/legacy/put_spec.lua
+++ b/test/functional/legacy/put_spec.lua
@@ -70,4 +70,29 @@ describe('put', function()
|
]])
end)
+
+ -- oldtest: Test_put_in_last_displayed_line()
+ it('in last displayed line', function()
+ local screen = Screen.new(75, 10)
+ screen:attach()
+ source([[
+ autocmd CursorMoved * eval line('w$')
+ let @a = 'x'->repeat(&columns * 2 - 2)
+ eval range(&lines)->setline(1)
+ call feedkeys('G"ap')
+ ]])
+
+ screen:expect([[
+ 2 |
+ 3 |
+ 4 |
+ 5 |
+ 6 |
+ 7 |
+ 8 |
+ 9xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^x |
+ |
+ ]])
+ end)
end)