浏览代码

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

Abouzar Parvan 3 年之前
父节点
当前提交
151684bba1
共有 1 个文件被更改,包括 2 次插入1 次删除
  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