aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-27 15:18:41 +0800
committerGitHub <noreply@github.com>2024-01-27 15:18:41 +0800
commitbf9e92c81c3cec65be5359d6b6a2ba1177995279 (patch)
tree3366ad701748d110980c87858be6c0f3279b54ed /test
parent7367838359bfb5fadf72ea2aeea2f84efb34590e (diff)
downloadrneovim-bf9e92c81c3cec65be5359d6b6a2ba1177995279.tar.gz
rneovim-bf9e92c81c3cec65be5359d6b6a2ba1177995279.tar.bz2
rneovim-bf9e92c81c3cec65be5359d6b6a2ba1177995279.zip
fix(events): check for WinResized/WinScrolled in terminal mode (#27226)
Diffstat (limited to 'test')
-rw-r--r--test/functional/autocmd/win_scrolled_resized_spec.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/autocmd/win_scrolled_resized_spec.lua b/test/functional/autocmd/win_scrolled_resized_spec.lua
index c2a534ab27..d40dc37103 100644
--- a/test/functional/autocmd/win_scrolled_resized_spec.lua
+++ b/test/functional/autocmd/win_scrolled_resized_spec.lua
@@ -39,6 +39,23 @@ describe('WinResized', function()
eq(2, eval('g:resized'))
eq({ windows = { 1002, 1001, 1000 } }, eval('g:v_event'))
end)
+
+ it('is triggered in terminal mode #21197 #27207', function()
+ exec([[
+ autocmd TermOpen * startinsert
+ let g:resized = 0
+ autocmd WinResized * let g:resized += 1
+ ]])
+ eq(0, eval('g:resized'))
+
+ command('vsplit term://')
+ eq({ mode = 't', blocking = false }, api.nvim_get_mode())
+ eq(1, eval('g:resized'))
+
+ command('split')
+ eq({ mode = 't', blocking = false }, api.nvim_get_mode())
+ eq(2, eval('g:resized'))
+ end)
end)
describe('WinScrolled', function()