On Thu, 2006-02-23 at 10:05 +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
> 
> Georg> This is a hack that will bite later. getChar is supposed to
> Georg> return the contents of an inset if it can be represented as a
> Georg> single character, not some arbitrary character. 
> 
> I think I agree.
> 
> Georg> What you really want to know is "Can the cursor descend into
> Georg> this inset?" We have InsetBase::editable() that exactly answers
> Georg> this question, the only disadvantage is that this is not
> Georg> implemented in mathed yet.
> 
> Yes.
> 
> Georg> The attached patch implements that and works for me as well.
> Georg> What needs to be done if this should go in is to check for side
> Georg> effects everywhere where editable() is used (fortunately only ~
> Georg> 3 places), and better testing, but I think that this approach
> Georg> is prefereable to the getChar hack.
> 
> Only MathNestInset needs this. All the others (including
> MathHullInset) derive from that. Actually, you can just check for
> asNestInset. 
> 
> The following works for me.

I think it is also logically more valid.

BTW get rid of the 

        if (it < end() && ...

 condition! It is redundant.

- Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to