On Fri, Mar 14, 2008 at 4:39 PM, Randy Kramer <[EMAIL PROTECTED]> wrote: > As part of my ongoing campaign to avoid really understanding the nedit code, I > ask the following questions. Obviously, I could test these items and find > out for myself, but if somebody can answer them, it will make it that much > easier for me. > > 1. Does a range of zero length "disappear"? (I'm hoping not.) > > 2. Can a given piece of text be part of more than one range as long as each > of > those ranges is in a different rangeset? > > My guess as to the answer to the 2nd question would have been yes, but then I > found this data structure for styles in textDisp.c: > > /* If you use both 32-Bit Style mask layout: > Bits +----------------+----------------+----------------+----------------+ > hex |1F1E1D1C1B1A1918|1716151413121110| F E D C B A 9 8| 7 6 5 4 3 2 1 0| > dec |3130292827262524|2322212019181716|151413121110 9 8| 7 6 5 4 3 2 1 0| > +----------------+----------------+----------------+----------------+ > Type | r r| r r r r b b b b| b b b b H 1 2 F| s s s s s s s s| > +----------------+----------------+----------------+----------------+ > where: s - style lookup value (8 bits) > F - fill (1 bit) > 2 - secondary selection (1 bit) > 1 - primary selection (1 bit) > H - highlight (1 bit) > b - backlighting index (8 bits) > r - rangeset index (6 bits) > This leaves 6 "unused" bits */ > > Which, without understanding at all its use in nedit, could almost lead me to > guess that a given piece of text can be part of only one rangeset. (I'm > hoping I'm wrong.) >From the docu:
Rangesets can be assigned a background color to make them visible: characters within all ranges of a rangeset will have the background color of the rangeset. (If more than one rangeset includes a given character, its background color will be that of the most recently created rangeset which has a color defined.) Bert > > Randy Kramer > -- > NEdit Develop mailing list - [email protected] > http://www.nedit.org/mailman/listinfo/develop > -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
