The problem is that when push() is called out of order, _data does not collect the input token correctly.
So I add a non-delta-encoded data attribute _dataNonDelta, which is used when the push() function is called in non-character stream order; it is eventually delta-encoded in build() or buildEdits().I hope this change doesn't affect any places that previously output _data.
If push() is called in order, we still use _data and it works the same as before.
Hi. This PR is to fix this issue.
The problem is that when
push()
is called out of order,_data
does not collect the input token correctly.So I add a non-delta-encoded data attribute
_dataNonDelta
, which is used when thepush()
function is called in non-character stream order; it is eventually delta-encoded inbuild()
orbuildEdits()
.I hope this change doesn't affect any places that previously output_data
.If
push()
is called in order, we still use_data
and it works the same as before.For the implementation of _sortAndDeltaEncode, I refer to the vscode source code here