diff options
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | plugins/rainbowparen.lua | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/manifest.json b/manifest.json index 2ce4030..e80bd38 100644 --- a/manifest.json +++ b/manifest.json @@ -1450,7 +1450,7 @@ }, { "description": "Show nesting of parentheses with rainbow colours", - "version": "0.1", + "version": "0.1.1", "path": "plugins/rainbowparen.lua", "id": "rainbowparen", "mod_version": "3" diff --git a/plugins/rainbowparen.lua b/plugins/rainbowparen.lua index 075667e..481ce55 100644 --- a/plugins/rainbowparen.lua +++ b/plugins/rainbowparen.lua @@ -38,12 +38,12 @@ function tokenizer.extract_subsyntaxes(base_syntax, state) return extract_subsyntaxes(base_syntax, state.istate) end -function tokenizer.tokenize(syntax, text, state) +function tokenizer.tokenize(syntax, text, state, resume) if not config.plugins.rainbowparen.enabled then - return tokenize(syntax, text, state) + return tokenize(syntax, text, state, resume) end state = state or {} - local res, istate = tokenize(syntax, text, state.istate) + local res, istate, resume = tokenize(syntax, text, state.istate, resume) local parenstack = state.parenstack or "" local newres = {} -- split parens out @@ -77,7 +77,7 @@ function tokenizer.tokenize(syntax, text, state) table.insert(newres, text) end end - return newres, { parenstack = parenstack, istate = istate } + return newres, { parenstack = parenstack, istate = istate }, resume end local function toggle_rainbowparen(enabled) |