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

From: Mitchell <m.att.foicica.com>
Date: Tue, 23 Jun 2020 15:39:05 -0400 (EDT)

Hi Gabriel,

On Mon, 22 Jun 2020, Gabriel Dubatti wrote:

> Hi Mitchell,
>
>     This change seems to solve the reset issue I reported on Linux and
> Windows!!
>
>     I'll continue testing it. I really appreciate all your efforts and
> support.
>
>     For now I added this to my init.lua:
>
>    if Util.TA_MAYOR_VER < 11 then
>       for _, buff in ipairs(_BUFFERS) do buff:set_theme('ggg') end
>    else
>      for _, vw in ipairs(_VIEWS) do vw:set_theme('ggg') end
>   end
>
>    The only minor thing I noticed is that if I change some buffer's colors
> and reset TA, all the buffer got the new colors on TA10.8 but only the active
> one on TA11.
>
>     Not a big deal but I wonder if there is a way I can update the theming on
> all the buffers at once.

Try:

   for _, view in ipairs(_VIEWS) do
     ui.goto_view(view)
     view:set_theme('ggg')
   end

Odd things can sometimes happen when working with non-global buffers and views, particularly when doing visual things. `ui.goto_view()` ensures `view:...` applies to what you think it should apply to.

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 23 Jun 2020 - 15:39:05 EDT

This archive was generated by hypermail 2.2.0 : Wed 24 Jun 2020 - 06:31:13 EDT