Lines are shifted when scrolling when a caret is on a line with a different font size.
Then select other line and they will be displayed correctly.
The following code reproduces it:
import { basicSetup, EditorView } from '@codemirror/basic-setup';
import { EditorState } from '@codemirror/state';
import { markdown } from '@codemirror/lang-markdown';
import { tags, HighlightStyle } from '@codemirror/highlight';
const myHighlightStyle = HighlightStyle.define([
{ tag: tags.heading1, fontSize: '2.5em' },
]);
const doc = '# 1\n' + [...Array(999)].map((v, i) => i + 2).join('\n');
const state = EditorState.create({
doc,
extensions: [
basicSetup,
markdown(),
myHighlightStyle,
]
})
const view = new EditorView({
state,
parent: document.body
});
Is this a problem with my usage? Or is it a bug?