File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -50,9 +50,12 @@ function forwardFileChanges(server: OmniSharpServer): IDisposable {
5050 }
5151
5252 if ( changeType === FileChangeType . Change && uri . fsPath . endsWith ( ".cs" ) ) {
53- // The server watches for file system events from .cs files, if we send
54- // a file changed event as well it will cause a double-apply and potentially
55- // invalidate the file state
53+ // When a file changes on disk a FileSystemEvent is generated as well as
54+ // a DidChangeTextDocumentEvent. The OmniSharp server listens for Change events
55+ // for ".cs" files and reloads their text from disk. This creates a situation where the server
56+ // may have updated the document to reflect disk and also recieves a set of TextChanges
57+ // to apply to the document. In order to avoid that situation, we will not send Change events
58+ // for ".cs" files and instead allow them to be updated via the DidChangeTextDocumentEvent.
5659 return ;
5760 }
5861
You can’t perform that action at this time.
0 commit comments