aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/ui.lua3
-rw-r--r--modules/textadept/editing.lua3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/ui.lua b/core/ui.lua
index 1392876f..1df96e45 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -337,7 +337,8 @@ end)
local EOLs = {_L['CRLF'], _L['CR'], _L['LF']}
local GETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[1]
-- Sets buffer statusbar text.
-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
local line, max = buffer:line_from_position(pos) + 1, buffer.line_count
local col = buffer.column[pos] + 1
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)