Fix on enter

This commit is contained in:
Adolfo Ochagavía 2018-11-09 13:10:53 +01:00
parent 8475c962a0
commit b98b1d0115

View file

@ -12,14 +12,14 @@ interface FileSystemEdit {
export interface SourceChange { export interface SourceChange {
label: string; label: string;
SourceFileNodeEdits: lc.TextDocumentEdit[]; sourceFileEdits: lc.TextDocumentEdit[];
fileSystemEdits: FileSystemEdit[]; fileSystemEdits: FileSystemEdit[];
cursorPosition?: lc.TextDocumentPositionParams; cursorPosition?: lc.TextDocumentPositionParams;
} }
export async function handle(change: SourceChange) { export async function handle(change: SourceChange) {
const wsEdit = new vscode.WorkspaceEdit(); const wsEdit = new vscode.WorkspaceEdit();
for (const sourceEdit of change.SourceFileNodeEdits) { for (const sourceEdit of change.sourceFileEdits) {
const uri = Server.client.protocol2CodeConverter.asUri( const uri = Server.client.protocol2CodeConverter.asUri(
sourceEdit.textDocument.uri sourceEdit.textDocument.uri
); );