From 0429b580e6f81cca3ff8e7da609ca868f39e5709 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 26 Mar 2021 14:19:07 +0100 Subject: [PATCH] Fixup 4671214f: add comment --- src/BufferView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index f9bbe234c6..308cf7f5ba 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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();