aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/textobject-lexer.lua
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2018-01-22 16:13:09 +0100
committerMarc André Tanner <mat@brain-dump.org>2018-01-22 21:50:05 +0100
commit5b8042ab1aa986d27e8974dbffe96bda6af61faf (patch)
treebf391f6c5bbb89a05ba35b73f64b7abb914d3156 /lua/plugins/textobject-lexer.lua
parenta94b52f7970ea5e6aa68fc5f5aa6c7de7884c7c7 (diff)
downloadvis-5b8042ab1aa986d27e8974dbffe96bda6af61faf.tar.gz
vis-5b8042ab1aa986d27e8974dbffe96bda6af61faf.tar.xz
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.
Diffstat (limited to 'lua/plugins/textobject-lexer.lua')
-rw-r--r--lua/plugins/textobject-lexer.lua2
1 files changed, 1 insertions, 1 deletions
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