aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-05-10 20:01:17 +0200
committerGitHub <noreply@github.com>2024-05-10 20:01:17 +0200
commita2c158ad063bef6d43687dcf78956cd4e56717e4 (patch)
treebb0f28b6137fa434825a0a697d7031354376e046 /test/functional
parent17d8f3b32ac18fcabf8e9869b8d9b88df27d1934 (diff)
parentfd50185492c7c5b042cc81fe1fde882bcff03c1b (diff)
downloadrneovim-a2c158ad063bef6d43687dcf78956cd4e56717e4.tar.gz
rneovim-a2c158ad063bef6d43687dcf78956cd4e56717e4.tar.bz2
rneovim-a2c158ad063bef6d43687dcf78956cd4e56717e4.zip
Merge pull request #28676 from luukvbaal/tuiflush
fix(tui): initialize clear attrs with current terminal background
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/terminal/tui_spec.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index f2f4f356be..d4628ea626 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -2003,6 +2003,39 @@ describe('TUI', function()
]])
end)
+ it('invalidated regions are cleared with terminal background attr', function()
+ local screen = Screen.new(50, 10)
+ screen:set_default_attr_ids({ [1] = { foreground = Screen.colors.Black } })
+ screen:attach()
+ fn.termopen({
+ nvim_prog,
+ '--clean',
+ '--cmd',
+ 'set termguicolors',
+ '--cmd',
+ 'sleep 10',
+ }, {
+ env = {
+ VIMRUNTIME = os.getenv('VIMRUNTIME'),
+ },
+ })
+ screen:expect({
+ grid = [[
+ {1:^ }|
+ {1: }|*8
+ |
+ ]],
+ })
+ screen:try_resize(51, 11)
+ screen:expect({
+ grid = [[
+ {1:^ }|
+ {1: }|*9
+ |
+ ]],
+ })
+ end)
+
it('argv[0] can be overridden #23953', function()
if not exec_lua('return pcall(require, "ffi")') then
pending('missing LuaJIT FFI')