You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I remove N characters and add N characters again without changing the token type within the update delay, the highlighting was removed due to how spans work (but does not reappear). This happens, because highlighting does not happen immediately but only after a period of inactivity and the diff algorithm is based on current tokens and last highlighted tokens. A naive/simple fix to this issue is to track the first and last edited character and then always replace that range with the new highlight tokens. Another way of fixing it would be to immediately apply the highlighting as soon as the tokenization finishes.
The text was updated successfully, but these errors were encountered:
AntonPieper
changed the title
Bug: Highlighting
Bug: Highlighting synchronization with shown text
Jul 30, 2024
If I remove
N
characters and addN
characters again without changing the token type within the update delay, the highlighting was removed due to how spans work (but does not reappear). This happens, because highlighting does not happen immediately but only after a period of inactivity and the diff algorithm is based on current tokens and last highlighted tokens. A naive/simple fix to this issue is to track the first and last edited character and then always replace that range with the new highlight tokens. Another way of fixing it would be to immediately apply the highlighting as soon as the tokenization finishes.The text was updated successfully, but these errors were encountered: