Re: [code] MMB click on tab bar (FR)

From: Procházka Lukáš Ing. <LPr.att.pontex.cz>
Date: Wed, 13 Nov 2019 12:43:44 +0100

Hello Mitchel,

On Thu, 07 Nov 2019 18:45:59 +0100, Mitchell <m.att.foicica.com> wrote:

> Hi Lukas,
>
> On Fri, 13 Sep 2019, Procházka Lukáš Ing. wrote:
>
> I've committed changes to the `events.TAB_CLICKED` event to include the mouse button number used[1], as well as any key modifiers held down. You will be able to close buffers on middle-click via something like:
>
> events.connect(events.TAB_CLICKED, function(button)
> if button == 2 then io.close_buffer() end
> end)

great news;
it might be better to add rather

        events.connect(events.TAB_CLICKED, function(index, button)
                -- index = index of panel which was clicked on
                -- button = mouse button: 1 = LMB, 2 = MMB, 3 = RMB
         end)

to keep backward compatibility with existing event handlers - but it's up to you anyway.

Best regards,

Lukas

> This will be in tonight's nightly build and in the next release.
>
> Cheers,
> Mitchell
>
> [1]: https://foicica.com/hg/textadept/rev/38bfe9d21cdd

-- 
Ing. Lukáš Procházka | mailto:LPr.att.pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
-- 
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 13 Nov 2019 - 06:43:44 EST

This archive was generated by hypermail 2.2.0 : Thu 14 Nov 2019 - 06:43:05 EST