Keep caret visible when small

Fix for ticket #12190.
This commit is contained in:
Daniel Ramoeller 2021-03-12 19:19:51 +01:00 committed by Jean-Marc Lasgouttes
parent 9b03680ab5
commit 4671214f3d

View File

@ -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();
}