Fix: cm.findPosH in one line

This commit is contained in:
eight 2017-11-09 06:58:08 +08:00
parent 0c64e6013b
commit 3844b3db73

View File

@ -325,11 +325,7 @@ function createAppliesToLineWidget(cm) {
cm.replaceRange(newText, range.from, range.to, 'appliesTo');
input.mark = cm.markText(
range.from,
cm.findPosH(
range.from,
newText.length,
'char'
),
cm.findPosH(range.from, newText.length, 'char'),
{clearWhenEmpty: false}
);
input.text = newText;