On Mon, Jun 23, 2014 at 7:28 AM, Jean-Marc Lasgouttes
<lasgout...@lyx.org> wrote:
> 23/06/2014 12:40, Scott Kostyshak:
>
>>> What about having Cursor::selection() return false if selection is empty?
>>
>>
>> Attached is my attempt to do this. I have no idea what this code does
>> though. Surprisingly the attempt seems to partially work (although I'm
>> sure it's still poorly written) if the selection is not started with
>> an inset. For example, if the cursor is just behind a note inset or a
>> table, selecting it will not work. If it is a math inset it crashes.
>
>
> What about simplifying the test to top() == anchor_.top() ?

Much cleaner. But same problems as above (selecting when an inset is
in front). Here is what I tested:

        bool selection() const { return selection_ && top() != anchor_.top(); }

>>> I think like Richard that the comment is incorrect.
>>
>>
>> Should we remove the comment then?
>
>
> Yes.

Done at c62a53b7.

Scott

Reply via email to