summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorgi Kirilov <>2023-08-22 00:38:02 +0800
committerGeorgi Kirilov <>2023-10-10 05:52:28 +0800
commit4d7c4eaed64bf367fd4979471d341f3e695041ae (patch)
tree188acc21e18f8229cdf4432dafd7e5a0a767ee5b
parent589d7c25f907f05019e42245e83266207352a310 (diff)
downloadvis-pairs-4d7c4eaed64bf367fd4979471d341f3e695041ae.tar.gz
fix for vis v0.9
the new Scintillua has a different module table layout.
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index ce21980..3d5e65d 100644
--- a/init.lua
+++ b/init.lua
@@ -117,7 +117,7 @@ end
local function escaping_context(win, range, data)
if not win.syntax then return {} end
- local rules = vis.lexers.lexers[win.syntax]._RULES
+ local rules = vis.lexers.load(win.syntax)._RULES
local p
for _, name in ipairs({vis.lexers.COMMENT, vis.lexers.STRING}) do
if rules[name] then
@@ -193,7 +193,7 @@ local function barf_linewise(win, content, start, finish)
if vis.mode == vis.modes.VISUAL_LINE then
local skip
if win.syntax then
- local rules = vis.lexers.lexers[win.syntax]._RULES
+ local rules = vis.lexers.load(win.syntax)._RULES
for _, name in ipairs({vis.lexers.COMMENT, vis.lexers.STRING}) do
if rules[name] then
skip = skip and skip + rules[name] / 0 or rules[name] / 0