On Tue, Apr 23, 2013, at 16:21, Roberto E. Vargas Caballero wrote:
> In drawregion you have:
> 
> 3172         bool ena_sel = sel.bx != -1;
> 3173
> 3174         if(sel.alt ^ IS_SET(MODE_ALTSCREEN))
> 3175                 ena_sel = 0;
> ...
> 3190                         if(ena_sel && *(new.c) && selected(x, y))
> 3191                                 new.mode ^= ATTR_REVERSE;
> 
> in selclear:
> 
> 937         sel.bx = -1;
> 938         tsetdirt(sel.b.y, sel.e.y);
> 
> in bpress:
> 
> 822                 if (sel.snap != 0) {
> 823                         tsetdirt(sel.b.y, sel.e.y);
> 824                         draw();
> 825                 }
> 
> 
> 
> It means when you select something you modify the attribute of the
> selected
> region.

That's not true. Only the attribute passed to xdraws() is altered - the
real attribute stored in the character cell is left alone.

Line 3189                       new = term.line[y][x]; makes a _copy_ of
the Glyph structure, and line 3191 only modifies the copy, not the
original.

Reply via email to