From 841e556f42bcc54fa11c9cef305d44d51edfd802 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Nov 2017 02:59:44 +0300 Subject: [PATCH] calc an actual per-item height even though CM doesn't seem to care --- edit/applies-to-line-widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/applies-to-line-widget.js b/edit/applies-to-line-widget.js index a35e541a..60161020 100644 --- a/edit/applies-to-line-widget.js +++ b/edit/applies-to-line-widget.js @@ -276,7 +276,7 @@ function createAppliesToLineWidget(cm) { height: itemHeight ? section.applies.length * itemHeight : undefined, }); widget.section = section; - itemHeight = itemHeight || widget.node.offsetHeight; + itemHeight = itemHeight || widget.node.offsetHeight / (section.applies.length || 1); yield widget; } removed.slice(i).forEach(clearWidget);