@@ -41,22 +41,10 @@ export class RazorDocumentSynchronizer {
4141 const ehdv = expectedHostDocumentVersion ;
4242 this . logger . logVerbose (
4343 `${ logId } - Synchronizing '${ documentKey } ':
44- Currently at ${ projectedDocument . hostDocumentSyncVersion } , synchronizing to version '${ ehdv } '.
45- Current host document version: '${ hostDocument . version } '
46- Current projected document version: '${ projectedDocument . projectedDocumentSyncVersion } '`
44+ Currently at ${ projectedDocument . hostDocumentSyncVersion } , synchronizing to version '${ ehdv } '.'`
4745 ) ;
4846 }
4947
50- if ( hostDocument . version !== expectedHostDocumentVersion ) {
51- if ( this . logger . verboseEnabled ) {
52- this . logger . logVerbose (
53- `${ logId } - toHostDocumentVersion and hostDocument.version already out of date.`
54- ) ;
55- }
56-
57- // Already out-of-date. Allowing synchronizations for now to see if this actually causes any issues.
58- }
59-
6048 const context : SynchronizationContext = this . createSynchronizationContext (
6149 documentKey ,
6250 projectedDocument ,
@@ -84,7 +72,7 @@ export class RazorDocumentSynchronizer {
8472
8573 const projectedTextDocument = await vscode . workspace . openTextDocument ( projectedDocument . uri ) ;
8674 const projectedTextDocumentVersion = this . getProjectedTextDocumentVersion ( projectedTextDocument ) ;
87- if ( projectedDocument . projectedDocumentSyncVersion !== projectedTextDocumentVersion ) {
75+ if ( projectedDocument . hostDocumentSyncVersion !== projectedTextDocumentVersion ) {
8876 if ( this . logger . verboseEnabled ) {
8977 this . logger . logVerbose (
9078 `${ logId } - Projected text document not in sync with data type, waiting for update...
@@ -162,7 +150,6 @@ export class RazorDocumentSynchronizer {
162150 logIdentifier : this . synchronizationIdentifier ,
163151 timeoutId,
164152 toHostDocumentVersion,
165- hostDocumentVersion : hostDocument . version ,
166153 cancel : ( reason ) => {
167154 for ( const reject of rejectionsForCancel ) {
168155 reject ( reason ) ;
@@ -210,7 +197,7 @@ export class RazorDocumentSynchronizer {
210197 }
211198
212199 for ( const context of synchronizationContexts ) {
213- if ( context . projectedDocument . projectedDocumentSyncVersion === projectedTextDocumentVersion ) {
200+ if ( context . projectedDocument . hostDocumentSyncVersion === projectedTextDocumentVersion ) {
214201 if ( this . logger . verboseEnabled ) {
215202 const li = context . logIdentifier ;
216203 const ptdv = projectedTextDocumentVersion ;
@@ -269,7 +256,6 @@ interface SynchronizationContext {
269256 readonly projectedDocument : IProjectedDocument ;
270257 readonly logIdentifier : number ;
271258 readonly toHostDocumentVersion : number ;
272- readonly hostDocumentVersion : number ;
273259 readonly timeoutId : NodeJS . Timer ;
274260 readonly projectedDocumentSynchronized : ( ) => void ;
275261 readonly onProjectedDocumentSynchronized : Promise < void > ;
0 commit comments