From 98915835b0f67daa4f8694710c6d254fd9974781 Mon Sep 17 00:00:00 2001 From: rxi Date: Tue, 19 May 2020 15:05:11 +0100 Subject: Made bracketmatch plugin update on document change --- plugins/bracketmatch.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') 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, -- cgit v1.2.3