aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp/utils_spec.lua
diff options
context:
space:
mode:
authorLW <git@llllvvuu.dev>2023-10-08 01:09:25 -0700
committerGitHub <noreply@github.com>2023-10-08 10:09:25 +0200
commit9abced6ad95f6300ae80cd8b8aa124ebcf511b50 (patch)
tree385c408707033460a7e3c36b949e58e729a3f346 /test/functional/plugin/lsp/utils_spec.lua
parent6823fdb20b1330142506410a62474166f646bf13 (diff)
downloadrneovim-9abced6ad95f6300ae80cd8b8aa124ebcf511b50.tar.gz
rneovim-9abced6ad95f6300ae80cd8b8aa124ebcf511b50.tar.bz2
rneovim-9abced6ad95f6300ae80cd8b8aa124ebcf511b50.zip
fix(lsp): account for border height in max floating popup height (#25539)
Diffstat (limited to 'test/functional/plugin/lsp/utils_spec.lua')
-rw-r--r--test/functional/plugin/lsp/utils_spec.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp/utils_spec.lua b/test/functional/plugin/lsp/utils_spec.lua
index 12763cfef5..804dc32f0d 100644
--- a/test/functional/plugin/lsp/utils_spec.lua
+++ b/test/functional/plugin/lsp/utils_spec.lua
@@ -212,6 +212,14 @@ describe('vim.lsp.util', function()
it('places window below for anchor_bias = "below"', function ()
assert_anchor('below', 'N')
end)
+
+ it('bordered window truncates dimensions correctly', function ()
+ local opts = exec_lua([[
+ return vim.lsp.util.make_floating_popup_options(100, 100, { border = 'single' })
+ ]])
+
+ eq(56, opts.height)
+ end)
end)
end)