Re: [code] [textadept] How to set "bright" ansi colors as background color in curses mode?

From: Pete Kazmier <pete.att.kazmier.com>
Date: Sat, 6 Apr 2013 11:15:41 -0500

Cool. I'll test this weekend. One question re the code, in your 'for' loop, why the test of '<=' vs '<'. Even in the original code, I had noticed this, but with a 0-based index, shouldn't this be '<'?

Did you get to take a look at the keybinding stuff I worked on last week? I thought you might like the functionality.

Btw, last night I watched your talk on textadept at lua confirm 2012. Well done. You speak extremely well. As a Lua newbie, I came across Lpeg, which then led me to your textadept. I've always been fond of programmable editors (huge emacs fan), so textadept immediately appealed to me, in particular, the ncurses version.

Sent from Pete's iPad

On Apr 6, 2013, at 10:50 AM, Mitchell <m.att.foicica.com> wrote:

> Hi Peter,
>
> On Wed, 3 Apr 2013, Peter Kazmier wrote:
>
>> Hi Mitchell,
>>
>> On Apr 2, 2013, at 10:36 PM, Mitchell <m.att.foicica.com> wrote:
>>>> Now all I need to do is figure out what is mucking with the background of all my characters. Any quick ideas? Maybe I need to check view.lua and buffer.lua in the theme directory too. I realized I have not done that.
>>>>
>>>
>>> Your solution is very clever. I tried something very similar last night when investigating the problem, but gave up when my terminal's COLOR_PAIRS was only 64, not 256 like yours. The only thing I can think of is that BRBLACK might not be 8 in your terminal. Perhaps debugging in ScintillaTerm::DrawTextNoClip() will help you determine what term_color_pair(fore, back) is returning.
>>
>> I figured it out ... I needed to redefine your SCI_COLOR_PAIR macro to return a unique value between the range of 1 and 256 with the expanded color set:
>>
>> #define SCI_COLOR_PAIR(f, b) ((b) * 16 + (f) + 1)
>>
>> With that, it's working great. Now I can tune my terminal solarized theme to my heart's content! I'm not sure how best to incorporate the code into your codebase as I imagine you'd want to test to see if a terminal has 8 or 16 color support.
>>
>> Here is a screenshot with everything working correctly:
>>
>> http://www.kazmier.com/~kaz/textadept2.png
>
> Thanks for your help! Scinterm now supports this[1]. Please test with your theme to make sure it works as expected and this will be in the next release. (Note: I've updated the color definitions.)
>
> Cheers,
> Mitchell
>
> [1]: http://foicica.com/hg/scinterm/rev/b866b0c05029
> --
> 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.
>

-- 
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 Sat 06 Apr 2013 - 12:15:41 EDT

This archive was generated by hypermail 2.2.0 : Sun 07 Apr 2013 - 06:30:16 EDT