[LyX/master] Keep caret visible when small
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Fri Mar 26 11:41:38 UTC 2021
commit 4671214f3dbc95207eda7cafb37cd0064b11f3e8
Author: Daniel Ramoeller <d.lyx at web.de>
Date: Fri Mar 12 19:19:51 2021 +0100
Keep caret visible when small
Fix for ticket #12190.
---
src/BufferView.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 79bf01f..f9bbe23 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -3159,7 +3159,7 @@ void BufferView::caretPosAndDim(Point & p, Dimension & dim) const
} else {
Font const font = cur.real_current_font;
frontend::FontMetrics const & fm = theFontMetrics(font);
- dim.wid = fm.lineWidth();
+ dim.wid = max(fm.lineWidth(), 1);
dim.asc = fm.maxAscent();
dim.des = fm.maxDescent();
}
More information about the lyx-cvs
mailing list