diff options
author | 2016-04-05 20:46:20 -0400 | |
---|---|---|
committer | 2016-04-05 20:46:20 -0400 | |
commit | 867e24ad43c2a253ba637da612f5edf7741b3ca6 (patch) | |
tree | 006fcb5167c14ea9e51a75172fae743fba9014ad /modules/textadept | |
parent | 6e086c1310caa4182e919a9ba6fe35f6c3bf3725 (diff) | |
download | textadept-867e24ad43c2a253ba637da612f5edf7741b3ca6.tar.gz textadept-867e24ad43c2a253ba637da612f5edf7741b3ca6.zip |
Do not run some `events.UPDATE_UI` handlers when scrolling.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/editing.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 93c180b7..8e6126a6 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -157,7 +157,8 @@ events.connect(events.KEYPRESS, function(code) end) -- Highlights matching braces. -events.connect(events.UPDATE_UI, function() +events.connect(events.UPDATE_UI, function(updated) + if updated and bit32.band(updated, 3) == 0 then return end -- ignore scrolling local pos = buffer.current_pos if (M.braces[buffer:get_lexer(true)] or M.braces)[buffer.char_at[pos]] then local match = buffer:brace_match(pos) |