Fixes #285: Multiple didOpen calls

This commit is contained in:
Dirk Baeumer 2017-10-03 12:42:12 +02:00
parent 66a1df9cc8
commit 811a08bda6

View file

@ -1479,7 +1479,7 @@ interface DidChangeConfigurationParams {
#### <a name="textDocument_didOpen"></a>DidOpenTextDocument Notification
The document open notification is sent from the client to the server to signal newly opened text documents. The document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri.
The document open notification is sent from the client to the server to signal newly opened text documents. The document's truth is now managed by the client and the server must not try to read the document's truth using the document's uri. Open in this sense means it is managed by the client. It doesn't necessarily mean that its content is presented in an editor. An open notification must not be sent more than once without a corresponding close notification send before. This means open and close notification must be balanced and the max open count is one.
_Notification_:
* method: 'textDocument/didOpen'
@ -1658,7 +1658,7 @@ export interface TextDocumentSaveRegistrationOptions extends TextDocumentRegistr
#### <a name="textDocument_didClose"></a>DidCloseTextDocument Notification
The document close notification is sent from the client to the server when the document got closed in the client. The document's truth now exists where the document's uri points to (e.g. if the document's uri is a file uri the truth now exists on disk).
The document close notification is sent from the client to the server when the document got closed in the client. The document's truth now exists where the document's uri points to (e.g. if the document's uri is a file uri the truth now exists on disk). As with the open notification the close notification is about managing the document's content. Receiving a close notification doesn't mean that the document was open in an editor before. A close notification requires a previous open notifaction to be sent.
_Notification_:
* method: 'textDocument/didClose'