Vincent van Ravesteijn - TNW wrote:
Starting your selection in an end margin often causes
the selection in this end margin to be painted later.
This is because when starting your selection in an end
margin, you may have set a (possible empty) selection
before really selecting the end margin. The problem
is that the checksum (computed later) is the same for
this empty selection and for the end margin selection.
Therfore, we need a call to cur.setSelection() before
evaluating cur.selection().
+ cur.setSelection();
bool selection = cur.selection()
// This is our text.
&& cur.text() == text_
// if the anchor is outside, this is not our selection
&& cur.anchor().text() == text_
&& pit>= sel_beg.pit()&& pit<= sel_end.pit();
... leading to nice assertions.
Hereby a new patch, without this nice feature.
As Richard said, it would be nice if you didn't attach your patch as
mime as they do not appear inline with Thunderbird.
I'll try to review this patch.
Abdel.
Vincent