Applying edits in Fourslash can cause caret to move off-range

This commit is contained in:
Mine Starks
2017-07-10 12:49:29 -07:00
parent e4a69174db
commit 0c40c18e98
+4
View File
@@ -1797,6 +1797,10 @@ namespace FourSlash {
// this.languageService.getScriptLexicalStructure(fileName);
}
if (this.currentCaretPosition < 0) {
this.currentCaretPosition = 0;
}
if (isFormattingEdit) {
const newContent = this.getFileContent(fileName);