]> git.lyx.org Git - features.git/commit
Avoid some caret ghosts
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 23 Nov 2017 14:38:17 +0000 (15:38 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Feb 2018 11:29:25 +0000 (12:29 +0100)
commitfa4fc6fc4d97f5c3d3e8ba44ad8b52f750293623
treeff9e1f3578f9050a958ad291d36f19cefab12852
parenta71610b9d72d346ac694518d6dab634f02247e2b
Avoid some caret ghosts

When the caret is at end of row, if may happen that it is drawn after
the end of the row. In this case caret blinking will not work
properly. This patch extends the row background on the left and right
by Inset::TEXT_TO_INSET_OFFSET. This is only a hack that will not work
if the caret has a ridiculous width like 6.

Additionally, introduce some (disabled) debug code that numbers the
rows on screen by painting order.

Finally, make the code that detects whether the caret was in a given
row more precise (take boundary into account).

Fixes (mostly, see above) bug #10797.

(cherry picked from commit e64ea3576c4534fc647a74d1c9f5e67db39ef783)
src/BufferView.cpp
src/TextMetrics.cpp