Re: [code] [textadept] Tab bar: labels shown; reordering

From: Procházka Lukáš Ing. <LPr.att.pontex.cz>
Date: Tue, 18 Sep 2018 15:36:06 +0200

Hello,

On Tue, 18 Sep 2018 15:10:57 +0200, Mitchell <m.att.foicica.com> wrote:

> Hi Lukas,
>
> On Tue, 18 Sep 2018, Procházka Lukáš Ing. wrote:
>
>> Hello,
>>
>> 1.
>>
>> when I create a new buffer by
>>
>> local buf = buffer.new(); buf._type = "test"
>>
>> a new tab with the label "Untitled" appears in the tab bar.
>> And only when I click another tab and back the last tab, the buffer name
>> "test" is shown in the tab bar.
>>
>> What function (event) should I call (emit) to tell the tab bar to
>> show/refresh the buffer label (be it ._type or .filename or another member)?
>
> Try calling `events.emit(events.UPDATE_UI)`.

I tried (text written into the command prompt Ctrl+E):

        local buf = buffer.new(); buf._type = "test"; events.emit(events.UPDATE_UI)

and also

        (function() local buf = buffer.new(); buf._type = "test"; events.emit(events.UPDATE_UI) end)()

but neither one works: new tab "Untitled" appears but it is not relabeled to "test".

>> 2.
>>
>> Is it possible to reorder buffers show in the tab bar? I'd like buffers
>> '[...]' be shown first, so e.g. let's have buffers:
>>
>> File2.txt | [Message Buffer] | File1.txt | [My Debug Buffer] ... (opened in
>> this order)
>>
>> and to be reordered into:
>>
>> [Message Buffer] | [My Debug Buffer] | File1.txt | File2.txt ... (new order)
>
> Sorry, this is not possible at the moment.

(OK - it would be nice in the future.)

Cheers,

Lukas

> 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 Tue 18 Sep 2018 - 09:36:06 EDT

This archive was generated by hypermail 2.2.0 : Wed 19 Sep 2018 - 06:55:09 EDT