From c8c02805f4fbd780f9ba16b0aeda4e15fa0f91ef Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Nov 2017 17:44:07 +0300 Subject: [PATCH] fixup 82651ed6: recreate widgets for active line if needed --- 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 fab8fdd5..9b7e5868 100644 --- a/edit/applies-to-line-widget.js +++ b/edit/applies-to-line-widget.js @@ -151,7 +151,7 @@ function createAppliesToLineWidget(cm) { // decide search range const fromIndex = widgets[i] ? cm.indexFromPos({line: widgets[i].line.lineNo(), ch: 0}) : 0; - const toIndex = cm.indexFromPos({line: widgets[j] ? widgets[j].line.lineNo() : toLine, ch: 0}); + const toIndex = cm.indexFromPos({line: (widgets[j] ? widgets[j].line.lineNo() : toLine) + 1, ch: 0}); // splice i = Math.max(0, i);