[code] [code}[textadept] vertical scrolling bug?

From: Peter Rolf <indiego.att.gmx.net>
Date: Fri, 8 Dec 2017 20:47:22 +0100


I had problems with wrong 'lexer' values in my Elastic Tabstops width
cache. The lexer cache for 'text' was even flooded with entries, when I
only had 'lua' files opened (no "Message Buffer" open at that time). I
could limit the wrong entries by filtering out "Message Buffer" related
modifications ('events.MODIFIED'). When I tried to do the same with
'events.UPDATE_UI' (vertically scrolling) the inner function wasn't
called anymore.

This means, that the message buffer is kind of 'active' while vertically
scrolling. Any inner code that relies on the correct 'buffer' value
while scrolling will fail.

Here is the code to reproduce the problem. Just put it into an existing
module or make a new one for testing.


local function buffer_problem(updated)
  if updated and (updated & UPDATE_V_SCROLL > 0) and (not buffer._type
== _L["[Message Buffer]"]) then
    error("Never called...")

events.connect(events.UPDATE_UI, buffer_problem)

Activate the code and use the vertical scrollbar in any buffer, that is
not the "Message Buffer". Nothing will happen, no 'error' raised.
Tested only with the nightly builds (sorry, already deleted
'properties.lua') on WIN32.
Best wishes,
PS: for i = 1, 10 do ui.print("Cheers!") end
-- @Gabriel: thanks for the tips
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 08 Dec 2017 - 14:47:22 EST

This archive was generated by hypermail 2.2.0 : Sat 09 Dec 2017 - 06:41:17 EST