Fixup 4671214f: add comment

This commit is contained in:
Jean-Marc Lasgouttes 2021-03-26 14:19:07 +01:00
parent a9b0f5faae
commit 0429b580e6

View File

@ -3159,6 +3159,8 @@ void BufferView::caretPosAndDim(Point & p, Dimension & dim) const
} else {
Font const font = cur.real_current_font;
frontend::FontMetrics const & fm = theFontMetrics(font);
// lineWidth() can be 0 to mean 'thin line' on HiDpi, but the
// caret drawing code is not prepared for that.
dim.wid = max(fm.lineWidth(), 1);
dim.asc = fm.maxAscent();
dim.des = fm.maxDescent();