Re: [code] [textadept] Update UI Events

From: Robert Gieseke <rob.g.att.web.de>
Date: Wed, 11 Jun 2014 21:31:13 +0200

Hi Mitchell,

Am 11/06/14 16:20, schrieb Mitchell:
>> the update ui events in the latest nightly look quite useful! I noted
>> that paging up and down or jumping to the start/end of the buffer
>> doesn't seem to trigger the selection event, is this a known issue or
>> not possible?
>
> I'm not seeing this behavior. I've connected to the `UPDATE_UI` event
> and simply print the parameter to the message buffer. Anytime I type an
> arrow, page up/down, home/end, etc. I get 2 (selection change) or 6
> (selection change + scroll).

Sorry, I overlooked checking for the actual bitmask works as expected,
thanks!

>> This reminded me to ask about some other events:
>> - Is it possible to receive a notification, when Textadept re-gains
>> focus? I would like to check for changes on disk (e.g version control
>> checkout) when going back to Textadept.
>
> Yes it would be possible, and I'll commit something soon.

Thanks!

>> - A notifaction when the size of the Textadept window changes, I would
>> like to resize my split views automatically when Textadept's window is
>> moved to an external screen.
>
> You can try hooking into `events.UPDATE_UI` and checking `ui.size` for
> changes. I'm not sure how the performance would be though. A brief bit
> of searching shows catching a resize using GTK is non-trivial.

I think I can just check on refocus, if needed I could just trigger a
refocus.

Cheers,
Robert

-- 
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 Wed 11 Jun 2014 - 15:31:13 EDT

This archive was generated by hypermail 2.2.0 : Thu 12 Jun 2014 - 06:27:24 EDT