Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function lineDelta(prev, cur) {
return utils.splitByLines(cur).length - utils.splitByLines(prev).length;
}
});
value = tabstopData.text;
var firstTabStop = tabstopData.tabstops[0] || {start: value.length, end: value.length};
firstTabStop.start += start;
firstTabStop.end += start;
var doc = this.editor.document;
start = this._posFromIndex(start);
end = this._posFromIndex(end);
var oldValue = doc.getRange(start, end);
doc.replaceRange(value, start, end);
this.createSelection(firstTabStop.start, firstTabStop.end);
this._saveSelection(utils.splitByLines(value).length - utils.splitByLines(oldValue).length);
return value;
},