Re: [code] [textadept] Event just a file to be opened

From: Procházka Lukáš Ing. <LPr.att.pontex.cz>
Date: Wed, 31 Jul 2019 18:20:56 +0200

Hello Mitchell,

thanks for the solution - works well!

Cheers,

Lukas

On Tue, 30 Jul 2019 21:43:38 +0200, Mitchell <m.att.foicica.com> wrote:

> If this only happens when an external application calls upon Textadept to open the file, then you may be able to hook into the undocumented 'cmd_line' event:
>
> events.connect('cmd_line', function()
> if buffer._type == _L['[Message Buffer]'] and #_VIEWS > 1 then
> -- go to another view
> end
> end, 1)
>
> Note the second argument to `events.connect()` is needed in order to be processed before Textadept's default event, which would open files passed to Textadept.
>
> I have not tested this idea though.
>
> Cheers,
> Mitchell

-- 
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 31 Jul 2019 - 12:20:56 EDT

This archive was generated by hypermail 2.2.0 : Thu 01 Aug 2019 - 06:39:02 EDT