@@ -41,22 +41,10 @@ export class RazorDocumentSynchronizer {
41
41
const ehdv = expectedHostDocumentVersion ;
42
42
this . logger . logVerbose (
43
43
`${ 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 } '.'`
47
45
) ;
48
46
}
49
47
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
-
60
48
const context : SynchronizationContext = this . createSynchronizationContext (
61
49
documentKey ,
62
50
projectedDocument ,
@@ -84,7 +72,7 @@ export class RazorDocumentSynchronizer {
84
72
85
73
const projectedTextDocument = await vscode . workspace . openTextDocument ( projectedDocument . uri ) ;
86
74
const projectedTextDocumentVersion = this . getProjectedTextDocumentVersion ( projectedTextDocument ) ;
87
- if ( projectedDocument . projectedDocumentSyncVersion !== projectedTextDocumentVersion ) {
75
+ if ( projectedDocument . hostDocumentSyncVersion !== projectedTextDocumentVersion ) {
88
76
if ( this . logger . verboseEnabled ) {
89
77
this . logger . logVerbose (
90
78
`${ logId } - Projected text document not in sync with data type, waiting for update...
@@ -162,7 +150,6 @@ export class RazorDocumentSynchronizer {
162
150
logIdentifier : this . synchronizationIdentifier ,
163
151
timeoutId,
164
152
toHostDocumentVersion,
165
- hostDocumentVersion : hostDocument . version ,
166
153
cancel : ( reason ) => {
167
154
for ( const reject of rejectionsForCancel ) {
168
155
reject ( reason ) ;
@@ -210,7 +197,7 @@ export class RazorDocumentSynchronizer {
210
197
}
211
198
212
199
for ( const context of synchronizationContexts ) {
213
- if ( context . projectedDocument . projectedDocumentSyncVersion === projectedTextDocumentVersion ) {
200
+ if ( context . projectedDocument . hostDocumentSyncVersion === projectedTextDocumentVersion ) {
214
201
if ( this . logger . verboseEnabled ) {
215
202
const li = context . logIdentifier ;
216
203
const ptdv = projectedTextDocumentVersion ;
@@ -269,7 +256,6 @@ interface SynchronizationContext {
269
256
readonly projectedDocument : IProjectedDocument ;
270
257
readonly logIdentifier : number ;
271
258
readonly toHostDocumentVersion : number ;
272
- readonly hostDocumentVersion : number ;
273
259
readonly timeoutId : NodeJS . Timer ;
274
260
readonly projectedDocumentSynchronized : ( ) => void ;
275
261
readonly onProjectedDocumentSynchronized : Promise < void > ;
0 commit comments