From 9abced6ad95f6300ae80cd8b8aa124ebcf511b50 Mon Sep 17 00:00:00 2001 From: LW Date: Sun, 8 Oct 2023 01:09:25 -0700 Subject: fix(lsp): account for border height in max floating popup height (#25539) --- test/functional/plugin/lsp/utils_spec.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/functional/plugin/lsp/utils_spec.lua') 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) -- cgit