Skip to content

Commit

Permalink
Fix maximum position for spine parser recovery
Browse files Browse the repository at this point in the history
This was causing all sorts of annoying and sometimes nondeterministic
problems, as it depended on the difference between the last parsed
snapshot and the current snapshot.
  • Loading branch information
mhutch committed Jul 12, 2023
1 parent 63293ef commit 292623a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Editor/Parsing/XmlBackgroundParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static int MaximumCompatiblePosition (ITextSnapshot snapshotA, ITextSnapshot sna
while (newVersion.VersionNumber != oldVersion.VersionNumber) {
if (oldVersion.Changes != null) {
foreach (var change in oldVersion.Changes) {
if (change.OldPosition > position) {
if (change.OldPosition < position) {
position = change.OldPosition;
break;
}
Expand Down

0 comments on commit 292623a

Please sign in to comment.