Check whether option exists (#301)

This commit is contained in:
Hexin
2021-10-09 15:18:18 +09:00
committed by GitHub
parent 6ca23ea407
commit 12a24c0eb3

View File

@@ -45,6 +45,10 @@ end
---@param key string ---@param key string
---@param value any ---@param value any
window.option = function(self, key, value) window.option = function(self, key, value)
if vim.fn.exists('+' .. key) == 0 then
return
end
if value == nil then if value == nil then
return self.opt[key] return self.opt[key]
end end