From 6d066af27a9af8ecfa2beaf22ac90ca0ec0a40b4 Mon Sep 17 00:00:00 2001 From: Tony Kuneck Date: Sun, 4 Oct 2020 01:06:44 -0700 Subject: Opts.wrap_at is sometimes a bool, ensure it falls back to a valid number in the call to math.min --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 53f88dea7d..b5f171a985 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -807,7 +807,7 @@ function M.fancy_floating_markdown(contents, opts) h.start = h.start + i - 1 h.finish = h.finish + i - 1 if h.finish + 1 <= #stripped then - table.insert(stripped, h.finish + 1, string.rep("─", math.min(width, opts.wrap_at))) + table.insert(stripped, h.finish + 1, string.rep("─", math.min(width, opts.wrap_at or width))) height = height + 1 end end -- cgit