Re: [Builder] Draw unwanted spaces



On Wed, Dec 03, 2014 at 10:28:46AM -0800, Christian Hergert wrote:
I don't use the draw-spaces functionality for the same reason as you, it
simply becomes too cluttered.

But if only unwanted spaces are drawn, ideally no spaces are drawn at
all on a well-formated code. Of course when working on an old file in
gtk+ for example, there are lots of trailing spaces, so drawing them is
a bit annoying.

Would it be simpler to add a callback function to determine if a space
should have a mark drawn? Then we could provide some reasonable
implementations (or allow applications to create their own).

Calling a function for each space in the buffer can be potentially
really slow.

That said, the variant approach also seems fine to me if we think that
covers all the use cases.

I think the locations make sense (leading, internal, trailing,
selection) and are fine-grained enough.

For a custom implementation, GtkTextView could provide a lower-level
API, for instance based on a GtkTextTag (but a tag is not convenient).

Sébastien


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