mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Applying edits in Fourslash can cause caret to move off-range
This commit is contained in:
@@ -1797,6 +1797,10 @@ namespace FourSlash {
|
||||
// this.languageService.getScriptLexicalStructure(fileName);
|
||||
}
|
||||
|
||||
if (this.currentCaretPosition < 0) {
|
||||
this.currentCaretPosition = 0;
|
||||
}
|
||||
|
||||
if (isFormattingEdit) {
|
||||
const newContent = this.getFileContent(fileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user