"Vincent van Ravesteijn - TNW" <[EMAIL PROTECTED]> writes:
>> //If there is a selection, return the containing inset menu  
>>  537         if (d->cursor_.selection())  
>>  538                 return d->cursor_.inset().contextMenu(*this, x,
> y);  
>
> Is it now ensured that you click on the selection and not outside the
> selection ?

Yes, because if you click outside of the selection, if will have been
reset at MOUSE_PRESS time (the code you point out below).

> The folowing patch will solve the problem of bug 5156 discussed before.
> Selecting the character at position 6 gives a selectionEnd at pos 7 and
> a selectionBegin at pos 6. Checking for the current selection using <=
> and >= always results in two characters being marked as selection. This
> is wrong, so I changed <= into <. This probably is the case at a lot
> more places in the code. 

It is my fault. I pondered using the correct test, actually :) But I
thought being a bit more lenient would be nice... If one clicks on the
second half of the last character of the selection (visually in the
selection itself), it will reset it...

JMarc

Reply via email to