rangesets

A.V.Kuznetsov kuzn at umps.mephi.ru
Mon Nov 6 19:45:00 CET 2006


On Mon, 06 Nov 2006 11:16:15 -0500
Tony Balinski <ajbj at free.fr> wrote:

> 
> Could you read the suggested text at
> http://www.nedit.org/niki/index.php/RangesetDocThree and tell me what
> you think? It doesn't talk about position sets, but I think gives the
> same ideas.
> 
This variant is more clear for me. I think, it may be slightly extended.

.........Ranges in the rangeset are therefore rather transient,
dynamic entities, which exist only to define the contiguous strings of
characters in the document text that belong to the rangeset.

Ranges forming a rangeset are numbered in the order of appearance in the text
buffer, counting from unity. A numbers of ranges, i.e. indexes, are also dynamic
entities. When ranges are added or removed before some range, it's index is
increased or decreased correspondingly.

..........

> These are modes I wanted to have when I implemented rangesets way back...
> one to remove any range affected by a modification, another to empty the
> set completely. The problem is that the rangesets are modified using a
> callback, with the same arguments as the screen refresh range, so if I
> destroyed the range beyond where the text was modified, this fact would
> not be reflected by the screen update. I didn't find a solution at the
> time (I did not want to add a refresh with a timer), and haven't
> revisited the question in ages. So that's why these two modes aren't
> there.

I understand. To want is easy, to do is hard.

Thank you.

Alexey


More information about the Discuss mailing list