Re: [code] [Textadept] Strange color change of fold margin

From: Lars <axteffekt.att.gmail.com>
Date: Mon, 20 Aug 2018 22:02:53 +0200

I forgot to mention: it's line 69 in my lexer. In the original file it's
line 38. I also felt free to attach a picture for proof.
:-[

Cheers.^^

Am 20/08/2018 um 21:33 schrieb Lars:
>
> Hi Mitch,
>
>
> Am 12/08/2018 um 22:11 schrieb Mitchell:
>> Hi,
>>
>> On Sat, 11 Aug 2018, Lars wrote:
>>
>>> Hi Mitch and folks,
>>>
>>> I have two more questions:
>>>
>>> In the lexer context.lua line 38 is the following code:
>>> lex:add_fold_point(lexer.OPERATOR, '{', '}')
>>> What use does it have? When I comment it, then I can still fold
>>> brackets
>>> (braces too): see A in the attached figure.
>>
>> That line supplies folding of '{' and '}', as you'd expect. When you
>> comment out that line in your lexer file, are you restarting
>> Textadept? Are you sure you're modifying the correct file? Remember
>> that any lexers in *~/.textadept/lexers/* override Textadept's
>> default lexers.
>
> I can't help it, but it seems to me that the line is unnecessary really.
> I did a fresh and clean installation of TA. Then I renamed the lexer
> file context.lua in Textadept/lexers to context.lua.bak, after I
> copied it to ~/lexers. There I commented line 69
> lex:add_fold_point(lexer.OPERATOR, '{', '}').
>
> After restarting TA and loading a ConTeXt file (status bar verifies
> context lexer) brackets are still foldable. Even braces, which aren't
> defined in the context.lua lexer anyway. It just seems to me that
> brackets, same as braces, fold globally, which if true would make line
> 69 in lexer context.lua redundant. Just wanted to let you know, as I
> know that you like to keep TA minimal.
>
> Please feel welcome to try for yourself with a MWE, after commenting
> the line mentioned above:
>
> \setupme[
>   content
> ]
>
> \setupme{
>   content
> }
>
> Cheers, L.
>>
>>> I also noticed some strange color change after resetting Lua. It can
>>> be seen
>>> in B in the attached figure.
>>> In short: when I start Textadept, then the fold margin is dark. When
>>> I reset
>>> Lua with Robert's code
>>> keys['f9'] = function()
>>>   io.save_file()
>>>   reset()
>>> end
>>>
>>> Then the fold margin switches to the colors which I defined in the
>>> skin file:
>>> buffer:set_fold_margin_colour(true, property_int['color.light_white'])
>>> buffer:set_fold_margin_hi_colour(true, property_int['color.lavender'])
>>>
>>> Most base16 and TA skins have the same colors for both, they also
>>> mostly have
>>> the same colors as the line numer margin, that's why I didn't notice
>>> it so
>>> far.
>>>
>>> Any ideas why this happens? I could also send you my skin.lua.
>>
>> No, I am not able to trigger this on my end. You'd have to send your
>> file to me. It's also worth making sure that your
>> *~/.textadept/init.lua* file is not making any additional settings.
>>
>> 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 Mon 20 Aug 2018 - 16:02:53 EDT

This archive was generated by hypermail 2.2.0 : Tue 21 Aug 2018 - 06:27:25 EDT