From 5b8042ab1aa986d27e8974dbffe96bda6af61faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 22 Jan 2018 16:13:09 +0100 Subject: lua: fix theme loading when lexer module is not available The color settings are currently stored in the `vis.lexers` table, make sure it is not nil even when loading the lexer module (or one of its dependencies e.g. lpeg) failed. --- lua/plugins/textobject-lexer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/plugins/textobject-lexer.lua') diff --git a/lua/plugins/textobject-lexer.lua b/lua/plugins/textobject-lexer.lua index fc4876b..2f9d757 100644 --- a/lua/plugins/textobject-lexer.lua +++ b/lua/plugins/textobject-lexer.lua @@ -4,7 +4,7 @@ local MAX_CONTEXT = 32768 vis:textobject_new("ii", function(win, pos) - if win.syntax == nil or not vis.lexers then + if not win.syntax or not vis.lexers.load then return nil end -- cgit v1.2.3