Re: [textadept] Textadept 3.1

From: Robert <ro....at.web.de>
Date: Tue, 24 Aug 2010 18:55:48 +0200

On Tue, Aug 24, 2010 at 6:21 PM, mitchell <c....at.caladbolg.net> wrote:
> Hi Robert,
>
>> On Sat, Aug 21, 2010 at 7:36 AM, mitchell <c....at.caladbolg.net> wrote:
>>>
>>> Changes:
>>>
>>>    * Refactored key commands to support propagation (1).
>>>    * Updated to Scintilla 2.20.
>>>    * Added Lua autocompletion(2).
>>>
>> I really like the Lua autocompletion but it seems the multiedit module
>> (1) seems to somehow prevent the activation after pressing "." or ":".
>> Has there something changed with regard to the propagation of key
>> events? Activating the auto-completion with ctrl-enter
>> works fine.
>>
>> (1) http://caladbolg.net/textadeptwiki/uploads/multiedit.lua
>
> Your char_added event handler is returning a boolean. When an event handler
> returns a boolean, event propagation stops. The autocompletion is triggered
> by 'char_added', not 'keypress'.
>

Thanks, as the Lua module adds it event handler later it didn't work.
Changing the char_added-event to

events.connect('char_added',
        function()
                restore = false
                positions = {}
                return
        end
)

seems to work.
Brian, was there a particular reason for stopping the propagation there?

Robert
Received on Tue 24 Aug 2010 - 12:55:48 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:51:35 EST