From 74e6ea5a56a9486e10220b45bf14ccc65155e07d Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 26 Nov 2017 05:09:16 +0300 Subject: [PATCH] fixup c8c02805: +1 only when no previous widget found --- 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 9b7e5868..c2cddaae 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) + 1, ch: 0}); + const toIndex = cm.indexFromPos({line: widgets[j] ? widgets[j].line.lineNo() : toLine + 1, ch: 0}); // splice i = Math.max(0, i);