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
With incrementalSync enabled, my files often get out of sync between Emacs and gopls. I dug into it a bit and the main problem I found was didChange doesn't apply already pending content changes before applying the new change that just came in.
Emacs tends to send multiple didChange events in rapid succession, and what happens is the first change gets queued up in the view's contentChanges, but not actually applied to the overlay. If the second change comes in before loadParseTypecheck calls applyContentChanges, then the second change ends up getting applied to the original content and the first change is overwritten in contentChanges.
With incrementalSync enabled, my files often get out of sync between Emacs and gopls. I dug into it a bit and the main problem I found was
didChange
doesn't apply already pending content changes before applying the new change that just came in.Emacs tends to send multiple didChange events in rapid succession, and what happens is the first change gets queued up in the view's
contentChanges
, but not actually applied to the overlay. If the second change comes in beforeloadParseTypecheck
callsapplyContentChanges
, then the second change ends up getting applied to the original content and the first change is overwritten incontentChanges
./cc @ianthehat
The text was updated successfully, but these errors were encountered: