Improve selection when selecting out of inset by the left

1/ put cusror in some display inset
2/ use shift-left until the cursor exits the inset
3/ see how the selection extends on the right.

This is not really a selection drawing bug, but rather the fact that
the anchor will be normalized to the first position after the inset,
which is in the next row.

This can be avoided by using the boundary property.

See discussion in bug #12520.
This commit is contained in:
Jean-Marc Lasgouttes 2022-04-18 18:13:17 +02:00
parent 335f158896
commit 50403c4ecf

View File

@ -322,6 +322,7 @@ DocIterator CursorData::selectionEnd() const
if (di.depth() > depth()) { if (di.depth() > depth()) {
di.resize(depth()); di.resize(depth());
++di.pos(); ++di.pos();
di.boundary(true);
} }
return di; return di;
} }