Procházet zdrojové kódy

there was a weird situation that caused lualine msg to turn boolean instead of table (#1492)

Abouzar Parvan před 3 roky
rodič
revize
151684bba1
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      lua/core/lualine/components.lua

+ 2 - 1
lua/core/lualine/components.lua

@@ -84,7 +84,8 @@ return {
       msg = msg or "LS Inactive"
       local buf_clients = vim.lsp.buf_get_clients()
       if next(buf_clients) == nil then
-        if #msg == 0 then
+        -- TODO: clean up this if statement
+        if type(msg) == "boolean" or #msg == 0 then
           return "LS Inactive"
         end
         return msg