fixup 82651ed6: recreate widgets for active line if needed

This commit is contained in:
tophf 2017-11-25 17:44:07 +03:00
parent 326dc5fb86
commit c8c02805f4

View File

@ -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);