fix lsp syncing
This commit is contained in:
parent
954827a0d6
commit
04e5d57a22
|
|
@ -210,10 +210,13 @@ export class OpenFile implements WorkspaceFile {
|
|||
private changeSet: ChangeSet;
|
||||
get changes(): ChangeSet {
|
||||
if (!this.changeSet) {
|
||||
this.changeSet = ChangeSet.empty(this.rootState.val.doc.length);
|
||||
this.clearChanges();
|
||||
}
|
||||
return this.changeSet;
|
||||
}
|
||||
clearChanges(): void {
|
||||
this.changeSet = ChangeSet.empty(this.rootState.val.doc.length);
|
||||
}
|
||||
|
||||
// Return an EditorView to be used by the LSP Workspace for position mapping.
|
||||
// If `main` is provided and belongs to this open file, return it. Otherwise
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class OpenFileWorkspace extends Workspace {
|
|||
result.push({ file, prevDoc, changes });
|
||||
file.doc = file.rootState.val.doc;
|
||||
file.version = this.nextFileVersion(file.uri);
|
||||
file.changes = ChangeSet.empty(file.doc.length);
|
||||
file.clearChanges();
|
||||
}
|
||||
for (const e of file.editors) {
|
||||
const plugin = LSPPlugin.get(e.view);
|
||||
|
|
|
|||
Loading…
Reference in New Issue