mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Applying edits in Fourslash can cause caret to move off-range
This commit is contained in:
1 parent
e4a69174db
commit
0c40c18e98
1 file changed
+4
@@ -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