aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/messages_spec.lua
diff options
context:
space:
mode:
authorEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2024-03-28 15:47:04 +0200
committerEvgeni Chasnovski <evgeni.chasnovski@gmail.com>2024-03-29 11:44:49 +0200
commitb61575ba70f8e9276d64a5ab312a9a56e833c2fe (patch)
tree5fc6f2d54bb2ad673de3c2f498882ad170d55553 /test/functional/ui/messages_spec.lua
parent9530a23016808fa5587e07d3d335852b90069c0f (diff)
downloadrneovim-b61575ba70f8e9276d64a5ab312a9a56e833c2fe.tar.gz
rneovim-b61575ba70f8e9276d64a5ab312a9a56e833c2fe.tar.bz2
rneovim-b61575ba70f8e9276d64a5ab312a9a56e833c2fe.zip
fix(intro): clear intro if new buffer is shown in focused float
Diffstat (limited to 'test/functional/ui/messages_spec.lua')
-rw-r--r--test/functional/ui/messages_spec.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
index 8a8808c3a7..fcfd94ff7c 100644
--- a/test/functional/ui/messages_spec.lua
+++ b/test/functional/ui/messages_spec.lua
@@ -1727,6 +1727,48 @@ describe('ui/ext_messages', function()
}
end)
+ it('clears intro screen when new buffer is active in floating window', function()
+ local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
+ api.nvim_open_win(api.nvim_create_buf(false, false), true, win_opts)
+ screen:expect {
+ grid = [[
+ |
+ {1:~ }{8:^ }{1: }|
+ {1:~ }|*22
+ ]],
+ }
+ end)
+
+ it('clears intro screen when initial buffer is active in floating window', function()
+ local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
+ api.nvim_open_win(api.nvim_get_current_buf(), true, win_opts)
+ screen:expect {
+ grid = [[
+ |
+ {1:~ }{8:^ }{1: }|
+ {1:~ }|*22
+ ]],
+ }
+ end)
+
+ it('clears intro screen when initial window is converted to be floating', function()
+ exec_lua([[
+ local init_win_id = vim.api.nvim_get_current_win()
+ vim.cmd('split')
+ local win_opts = { relative = 'editor', height = 1, width = 5, row = 1, col = 5 }
+ vim.api.nvim_win_set_config(init_win_id, win_opts)
+ vim.api.nvim_set_current_win(init_win_id)
+ ]])
+ screen:expect {
+ grid = [[
+ |
+ {1:~ }{8:^ }{1: }|
+ {1:~ }|*21
+ {6:[No Name] }|
+ ]],
+ }
+ end)
+
it('supports global statusline', function()
feed(':set laststatus=3<cr>')
feed(':sp<cr>')