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
Replace CodeMirror/mode/markdown/index.html with the attached index.html
Open that index.html
Paste in the contents of aaaa.txt (sorry I couldn't make up a small repro case)
In the console run editor.setCursor({line: 485, ch: 28, xRel: 1})
Expected:
Editor scrolls to the indicated position
Actual:
Editor scrolls to the indicated position, and then the highlighting gets messed up, flipping code-style and normal-style text. I'm pretty sure this is because of a reparse/redraw that doesn't start very far up above the upper edge of the viewport.
The mode was, for some reason, keeping state in a variable rather than in its state object, and this kind of corruptions in rare situation are exactly what that causes. Attached patch fixes this.
Repro steps:
editor.setCursor({line: 485, ch: 28, xRel: 1})
Expected:
Editor scrolls to the indicated position
Actual:
Editor scrolls to the indicated position, and then the highlighting gets messed up, flipping code-style and normal-style text. I'm pretty sure this is because of a reparse/redraw that doesn't start very far up above the upper edge of the viewport.
repro.zip
The text was updated successfully, but these errors were encountered: