aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/put_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-23 00:30:52 +0800
committerGitHub <noreply@github.com>2023-04-23 00:30:52 +0800
commit040d9da5c8f4d56e0482758223ea7bb04dc90cc0 (patch)
tree2bc921c0a0977805e741d1afb52c547f0a7fb95d /test/functional/legacy/put_spec.lua
parent1cb46abff1e903e999105b244329f22678ba8a30 (diff)
downloadrneovim-040d9da5c8f4d56e0482758223ea7bb04dc90cc0.tar.gz
rneovim-040d9da5c8f4d56e0482758223ea7bb04dc90cc0.tar.bz2
rneovim-040d9da5c8f4d56e0482758223ea7bb04dc90cc0.zip
vim-patch:9.0.1476: lines put in non-current window are not displayed (#23265)
Problem: Lines put in non-current window are not displayed. (Marius Gedminas) Solution: Don't increment the topline when inserting just above it. (closes vim/vim#12212) https://github.com/vim/vim/commit/e7f05a8780426dc7af247419c6d02d5f1e896689 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.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/legacy/put_spec.lua b/test/functional/legacy/put_spec.lua
index 3ddf65490e..e83fde774a 100644
--- a/test/functional/legacy/put_spec.lua
+++ b/test/functional/legacy/put_spec.lua
@@ -1,4 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local exec_lua = helpers.exec_lua
local meths = helpers.meths
@@ -42,4 +43,31 @@ describe('put', function()
bwipe!
]]
end)
+
+ -- oldtest: Test_put_other_window()
+ it('above topline in buffer in two splits', function()
+ local screen = Screen.new(80, 10)
+ screen:attach()
+ source([[
+ 40vsplit
+ 0put ='some text at the top'
+ put =' one more text'
+ put =' two more text'
+ put =' three more text'
+ put =' four more text'
+ ]])
+
+ screen:expect([[
+ some text at the top │some text at the top |
+ one more text │ one more text |
+ two more text │ two more text |
+ three more text │ three more text |
+ ^four more text │ four more text |
+ │ |
+ ~ │~ |
+ ~ │~ |
+ [No Name] [+] [No Name] [+] |
+ |
+ ]])
+ end)
end)