]> git.lyx.org Git - features.git/commit
Avoid bleeding of inset background outside of inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 24 Mar 2020 11:01:43 +0000 (12:01 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 24 Mar 2020 11:13:36 +0000 (12:13 +0100)
commiteb92f74d1f7ae63112b9439058d746f7ff93e8f4
tree62c6a22cb1b63764d84c5c5d84eecbf746795c42
parent52cd43dfdcffa3d293cec1be11ac9d4fa55b46bd
Avoid bleeding of inset background outside of inset

As a consequence of fix e64ea357 to ticket #10797, we draw a bit too
much of the inset background outside of the inset (visible for insets
with colored background). #10797 is a ticket that triggers when the
cursor has a width larger than 1.

This patch limits the problems in two respects

* nothing is done on the left, since the cursor width only expands on
  the right.

* on the right, the extra width is limited to cursor width.

Fixes bug #11786.
src/TextMetrics.cpp