diff options
author | rxi <rxi@users.noreply.github.com> | 2020-05-19 15:05:11 +0100 |
---|---|---|
committer | rxi <rxi@users.noreply.github.com> | 2020-05-19 15:05:11 +0100 |
commit | 98915835b0f67daa4f8694710c6d254fd9974781 (patch) | |
tree | 50cb85b78e277deef0e063c29a0ea0ac2c19c410 /plugins/bracketmatch.lua | |
parent | d846b97df5fc82b96f41189a5495422a9cc4979b (diff) | |
download | lite-xl-plugins-98915835b0f67daa4f8694710c6d254fd9974781.tar.gz lite-xl-plugins-98915835b0f67daa4f8694710c6d254fd9974781.zip |
Made bracketmatch plugin update on document change
Diffstat (limited to 'plugins/bracketmatch.lua')
-rw-r--r-- | plugins/bracketmatch.lua | 6 |
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, |