diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-22 09:13:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 09:13:07 +0800 |
commit | 711a2f5ff67d245ee9a1322f9554329537977989 (patch) | |
tree | 3f7404c004fc392520e892b50653345e82bb0049 /test/functional/ui | |
parent | 2137edbd4f15781a3a17091d38688a8ecbc02988 (diff) | |
download | rneovim-711a2f5ff67d245ee9a1322f9554329537977989.tar.gz rneovim-711a2f5ff67d245ee9a1322f9554329537977989.tar.bz2 rneovim-711a2f5ff67d245ee9a1322f9554329537977989.zip |
fix(api): don't leak memory with nvim_win_get_ns (#27570)
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 6e74d83a79..b6e1a776e8 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -5792,7 +5792,8 @@ describe('decorations: window scoped', function() end_col = 3, }) - api.nvim_win_add_ns(0, ns) + eq(true, api.nvim_win_add_ns(0, ns)) + eq({ ns }, api.nvim_win_get_ns(0)) screen:expect { grid = [[ @@ -5803,10 +5804,12 @@ describe('decorations: window scoped', function() command 'split' command 'only' + eq({}, api.nvim_win_get_ns(0)) screen:expect(noextmarks) - api.nvim_win_add_ns(0, ns) + eq(true, api.nvim_win_add_ns(0, ns)) + eq({ ns }, api.nvim_win_get_ns(0)) screen:expect { grid = [[ |