You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like this extension no longer does code completion because of recent changes to code mirror.
TypeScriptDocument.prototype.updateScriptWithChange=function(doc,change){// Special case: the range is no longer meaningful since the entire text was replacedif(!change.from||!change.to){// Update all the scriptthis.updateScriptWithText(doc,doc.getText());}varminChar=this.getIndexFromPos(change.from,doc),limChar=this.getIndexFromPos(change.to,doc),newText=change.text.join('\n');this.lsh.editScript(getScriptName(doc),minChar,limChar,newText);};
In the code block above change is now an array of changes and, as such, change.from and change.to have moved to elements of the array. This code tries to resolve positions for undefined which fail causing other things to fail and code completion to stop workinig.
The text was updated successfully, but these errors were encountered:
I was looking into fixing this but I am unsure of the previous CodeMirror behavior and how to fix this for the changes made. In the current CM behavior, change.from and change.to are not only elements of an array but are also objects themselves, containing ch, line, and sometimes xRel properties. This code seems to check if change.from or change.to do not exist, so I am thinking the updated code would be if (change[0].from.ch === change[0].to.ch) { }, going by the comment in the code. Is that correct?
It looks like this extension no longer does code completion because of recent changes to code mirror.
In the code block above
change
is now an array of changes and, as such,change.from
andchange.to
have moved to elements of the array. This code tries to resolve positions forundefined
which fail causing other things to fail and code completion to stop workinig.The text was updated successfully, but these errors were encountered: