Re: [code] [textadept] Odd indicator/view_ws interaction

From: Mitchell <m.att.foicica.com>
Date: Tue, 17 Mar 2015 10:32:47 -0400 (EDT)

Hi Chris,

On Mon, 16 Mar 2015, Chris Emerson wrote:

> Hi Mitchell,
>
> On Mon, Mar 16, 2015 at 10:43:14AM -0400, Mitchell wrote:
>> Please do me a favor and search
>> "src/scintilla/term/ScintillaTerm.cxx" for "ACS_BULLET" and change
>> that line to this:
>>
>> rc.right = (int)rc.right, ch = ACS_BULLET | A_BOLD | A_ALTCHARSET;
>>
>> Then recompile and try it in gnome-terminal and let me know if it
>> works. I don't have gnome-terminal and the means to test this
>> myself.
>
> I have PuTTY handy, and no, that makes no difference.
>
> However, the following very quick hack in AlphaRectangle() seems to fix it.
> This fixes both problems:
> * When indicating " foo", the "foo" becomes garbled drawing characters
> * When indicating "foo ", the space (bullet) becomes "~".
>
> I guess the A_ALTCHARSET may be needed, but is clobbered (or set spuriously)
> depending on whether the first character in the indicator rectangle had that
> set or not.
>
> void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill,
> int alphaFill, ColourDesired outline, int alphaOutline,
> int flags) {
> int x = rc.left, y = rc.top - 1, len = rc.right - rc.left;
> #if 1
> for (int i=0; i<len; ++i, ++x) {
> attr_t attrs = wattrget(win, y, x);
> short pair = PAIR_NUMBER(attrs), fore = COLOR_WHITE;
> if (pair > 0) pair_content(pair, &fore, NULL);
> mvwchgat(win, y, x, 1, attrs, term_color_pair(fore, fill), NULL);
> }
> #else
> attr_t attrs = wattrget(win, y, x);
> short pair = PAIR_NUMBER(attrs), fore = COLOR_WHITE;
> if (pair > 0) pair_content(pair, &fore, NULL);
> mvwchgat(win, y, x, len, attrs, term_color_pair(fore, fill), NULL);
> #endif
> }

Thanks, that did the trick. I've committed something similar.

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 17 Mar 2015 - 10:32:47 EDT

This archive was generated by hypermail 2.2.0 : Wed 18 Mar 2015 - 06:41:16 EDT