aboutsummaryrefslogtreecommitdiff
path: root/plugins/bracketmatch.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/bracketmatch.lua')
-rw-r--r--plugins/bracketmatch.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/bracketmatch.lua b/plugins/bracketmatch.lua
index 432dd42..4253de7 100644
--- a/plugins/bracketmatch.lua
+++ b/plugins/bracketmatch.lua
@@ -48,8 +48,9 @@ local function update_state(line_limit)
-- early exit if nothing has changed since the last call
local line, col = doc:get_selection()
- if state.doc == doc and state.line == line and state.col == col
- and state.limit == line_limit then
+ local change_id = doc:get_change_id()
+ if state.doc == doc and state.line == line and state.col == col
+ and state.change_id == change_id and state.limit == line_limit then
return
end
@@ -70,6 +71,7 @@ local function update_state(line_limit)
-- update
state = {
+ change_id = change_id,
doc = doc,
line = line,
col = col,