On Fri, Jan 23, 2009 at 09:37:24PM +0000, Charles Acknin wrote:

> Gautam, could you please be more specific with "highlight the
> selection" and how this works?  I'm fairly new to the codebase and
> although not the biggest I've seen out there, it'd help a lot if you
> could point me directly to the parts of interest that you think are
> appropriate for the task.

Look in screen.c:4116 (you might have to read a lot of the code before /
after to follow). Basically each character on screen is stored in two
arrays -- one for the character PVTS(r,p).text, and one for a bit mask
of the attributes PVTS(r,p).rend.

Input from a child process is parsed by mrxvt (according to VT100
specifications), and the data is put into these two arrays. When the
user selects some text, the corresponding characters in PVTS(r,p).rend
get bit number Rs_Blink set. When the text is drawn it will be
highlighted as blinking text.

What you should do is add a byte to PVTS(r,p).rend. This will give 8
extra bits of information (at the expense of a little more memory use).
One of these bits should be for the user selection -- selected text
should have it's own attribute, and not reuse the blink attribute. The
others can be used for user defined patterns. (It would be nice to
reserve at least one such bit for URL's, and incorporate some way for
the user to open them easily.)

GI

-- 
Experience is what a comb gives you after you lose your hair.

Attachment: pgpWSocMdwtBx.pgp
Description: PGP signature

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Materm-devel mailing list
Materm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/materm-devel
mrxvt home page: http://materm.sourceforge.net

Reply via email to