Re: [code] [textadept] Unwanted view switch events

From: Chris Emerson <c-ta.att.mail.nosreme.org>
Date: Tue, 16 Apr 2019 08:41:58 +0100

Hi Mitchell,

On Mon, Apr 15, 2019 at 09:59:55PM -0400, Mitchell wrote:
> On Sun, 14 Apr 2019, Chris Emerson wrote:
> >I'm not very sure about why all this is happening, so here I am asking for
> >suggestions on how to fix or work around this. :-)
>
> I think removing that entire "else if" conditional for `SCN_SAVEPOINTLEFT`
> would be a sufficient workaround. I'm trying to think if it even makes
> sense to send `SCN_SAVEPOINTLEFT` notifications for non-focused views.
> Textadept currently only uses that notification to change title text ('*'
> dirty mark), and that only makes sense for focused buffers, so user scripts
> would be the only things that might really want to know if any buffer
> becomes dirty. Whether or not they need it in real-time is debatable, and
> it can be checked for in a `events.BUFFER_AFTER_SWITCH` event via
> `buffer.modify`.
>
> I'm leaning towards eliminating the conditional and only sending
> `SCN_SAVEPOINTLEFT` for focused views.

That sounds good to me - I'm a fan of bug fixes which remove more code than
they add. :-) I'll try that out.

Thanks,

Chris

-- 
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 16 Apr 2019 - 03:41:58 EDT

This archive was generated by hypermail 2.2.0 : Tue 16 Apr 2019 - 06:53:30 EDT