Re: [code] [textadept] Textadept events

From: Richard Philips <richard.philips.att.gmail.com>
Date: Tue, 17 Sep 2013 18:31:42 +0200

On 09/17/2013 06:08 PM, Mitchell wrote:
> Hi Richard,
>
> On Tue, 17 Sep 2013, Richard Philips wrote:
>
>> Hi,
>>
>> I'm working with textadept events.
>>
>> I try to connect a Lua function to the DOUBLE_CLICK event.
>>
>> That works.
>>
>> But it seems that there are other actions connected to this event
>> (the word under the caret is highlighted).
>> I'm unable to delete these actions: with '|disconnect|(/event, id/)'
>> you need an id to disconnect.
>>
>> By the way, I am aware how to prevent firing other actions which are
>> registered after mine, but this is exactly the opposite.
>>
>> Any advice to tackle this problem (especially with the DOUBLE_CLICK
>> event on Ubuntu) would be much appreciated.
>
> Highlighting the double-clicked word is default Scintilla behavior --
> no Textadept event is responsible for this. If you want to disable
> highlighting, use something like this:
>
> events.connect(events.DOUBLE_CLICK,
> function(pos) buffer:goto_pos(pos) end, 1)
>
> Cheers,
> Mitchell

-- 
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 Tue 17 Sep 2013 - 12:31:42 EDT

This archive was generated by hypermail 2.2.0 : Wed 18 Sep 2013 - 06:36:05 EDT