nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] regarding color syntax


From: Jeff DeFouw
Subject: Re: [Nano-devel] regarding color syntax
Date: Wed, 18 Sep 2002 07:50:35 -0500
User-agent: Mutt/1.4i

On Wed, Sep 18, 2002 at 02:00:34AM -0400, David Benbennick wrote:
> Put these substrings together, and you get the whole line!  In
> quote36b.patch I made edit_add() be careful to paint everything that
> matches.  That seemed like the most logical behavior, but apparently it is
> not as convenient.  In Nano CVS, the paint routine doesn't allow
> overlapping match regions, so only sees the first and last matches.
> 
> Here's a tiny patch that fixes the problem.  (It applies after quote36b.)

That example looks good now, but I have found another complex case to
throw at you. :)  Multiline coloring apparently still overlaps:

For example, if you were writing a code generator you might do this:

printf("#define THIS \"is a string\" /* comment the C program prints\n");
/* real comment */

Here the string highlights until before /* and then the first /*
highlights all the way through the string to */

I've never really used a code-highlighting editor before so I don't know
how complex they get.  I'm thinking code is always nonoverlapping but
what about non-code?

On a separate note, shouldn't "#ifn*def" be "#ifn?def"?

-- 
Jeff DeFouw <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]