Skip to content

Commit

Permalink
Fix #216 Remove unused function
Browse files Browse the repository at this point in the history
Remove a function that is no longer used now that we are no longer
trying to sort the changes received from textDocument/didChange.

Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Apr 2, 2018
1 parent cacb1a2 commit 4b5ca39
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,6 @@ connection.onDidOpenTextDocument((didOpenTextDocumentParams: DidOpenTextDocument
validateTextDocument(document);
});

function getLaterChange(changes: TextDocumentContentChangeEvent[], i: number, j: number): number {
if (changes[i].range.start.line === changes[j].range.start.line) {
return changes[i].range.start.character < changes[j].range.start.character ? j : i;
} else if (changes[i].range.start.line < changes[j].range.start.line) {
return j;
}
return i;
}

connection.onDidChangeTextDocument((didChangeTextDocumentParams: DidChangeTextDocumentParams): void => {
let document = documents[didChangeTextDocumentParams.textDocument.uri];
let buffer = document.getText();
Expand Down

0 comments on commit 4b5ca39

Please sign in to comment.