From 867e24ad43c2a253ba637da612f5edf7741b3ca6 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 5 Apr 2016 20:46:20 -0400 Subject: Do not run some `events.UPDATE_UI` handlers when scrolling. --- core/ui.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/ui.lua') 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 -- cgit v1.2.3