]> git.lyx.org Git - lyx.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, 23 Nov 2017 14:38:17 +0000 (15:38 +0100)
commite64ea3576c4534fc647a74d1c9f5e67db39ef783
tree7ba81ac3ed7e98e1fb791aa335ab947bcb2727da
parent4f10c0a14b8ac455be4bc430dec07f033b7282ac
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.
src/BufferView.cpp
src/TextMetrics.cpp