From 7f8ff1220e5b9f440cc0459a261625e456348656 Mon Sep 17 00:00:00 2001 From: max397574 Date: Sun, 31 Oct 2021 12:39:45 +0100 Subject: =?UTF-8?q?fix(validate):=20=F0=9F=90=9Bdon't=20check=20content=20?= =?UTF-8?q?if=20type=3Doldfiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/startup/utils.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index b8b7a82..acb91bd 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -268,13 +268,17 @@ function U.validate_settings(options) margin = { options.margin, "number" }, command = { options.command, "string" }, content = {options.content, - function(content) - if options.type =="text" and (type(content)== "table" or type(content == "function")) then - return true - elseif options.type == "mapping" and type(content) == "table" then - return true - end - end}, + function(content) + if options.type =="text" and (type(content)== "table" or type(content) == "function") then + return true + elseif options.type == "mapping" and type(content) == "table" then + return true + elseif options.type == "oldfiles" then + return true + end + return false + end, + "table for type=mapping and table or function for type=text"}, default_color = { options.default_color, "string" }, highlight = { options.highlight, "string" }, oldfiles_amount = { -- cgit v1.2.3