Re: [code] [textadept] Textadept 11.0 alpha 2

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Tue, 30 Jun 2020 11:38:19 -0300

Hi Mitchell,

This is how I worked around the issue:

if #_BUFFERS > 1 then

       local sbuf= buffer

       for _, buf in ipairs(_BUFFERS) do
         tab_changeView(buf)
         view:goto_buffer(buf)
         view:set_theme(TA_THEME)
       end

       --keep current buffer selected
       tab_changeView(sbuf)
       view:goto_buffer(sbuf)

end

reset()

Note: tab_changeView() is the function I call when a tab is clicked to
choose the proper view for the buffer.

Cheers,

Gabriel

El 30/06/2020 a las 11:25, Mitchell escribió:
> Hi Gabriel,
>
> On Sun, 28 Jun 2020, Gabriel Dubatti wrote:
>
>> Hi Mitchell,
>>
>>   I know I changed a lot o things, but the code works fine with TA
>> 10.8 and
>> all previous versions of TA.
>>
>>   What I see is that the buffers that are currently visible in each
>> view get
>> the theme change, but not the others (show them using ctrl+tab, for
>> example).  You can reproduce the issue with this:
>>
>> 1) Put this in init.lua:
>>
>>  for _, vw in ipairs(_VIEWS) do view:set_theme('dark') end
>>
>> 2) Open init.lua and any other file
>>
>> 3) Check with ctrl+tab that both files use the dark theme
>>
>> 4) Change "dark" to "light" in init.lua and save the file
>>
>> 5) Run reset() from the command entry
>>
>> 6) Check that init.lua use the LIGHT theme (ok)
>>
>> 7) Press Ctrl+TAB and check that the other file still used the DARK
>> theme
>> (not-ok)
>>
>>   As I said, it's not a big deal, but it seems to me that some theme
>> configurations are not updated in TA11 in the buffers that are not
>> visible
>> after a reset when view:set_theme() is called.
>
> Okay, thanks. I'll look into this.
>
> Cheers,
> Mitchell

-- 
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 30 Jun 2020 - 10:38:19 EDT

This archive was generated by hypermail 2.2.0 : Wed 01 Jul 2020 - 06:47:59 EDT