Explorar el Código

fix(peek): make sure popup_options are positive (#2373)

Abouzar Parvan hace 3 años
padre
commit
4affc21771
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      lua/lvim/lsp/peek.lua

+ 2 - 1
lua/lvim/lsp/peek.lua

@@ -33,7 +33,8 @@ local function create_floating_file(location, opts)
     false
   )
   local width, height = vim.lsp.util._make_floating_popup_size(contents, opts)
-  opts = vim.lsp.util.make_floating_popup_options(width, height, opts)
+  local if_nil = vim.F.if_nil
+  opts = vim.lsp.util.make_floating_popup_options(if_nil(width, 30), if_nil(height, 10), opts)
   -- Don't make it minimal as it is meant to be fully featured
   opts["style"] = nil