Content Shifted when CM revealed

Hello,

For some reason, whenever I try and reveal a CodeMirror instance after making content changes, the text is always shifted such that the beginning of each line is covered by the gutter.

I’ve tried to refresh the CM instance, and I’ve tried to use autoRefresh, but the issue still doesn’t go away. Any input/advice would be greatly appreciated. Thanks!

-John Louie

Can you create a minimal demo HTML page that shows the problem?

I’ve been seeing this as well. Seems to happen when a cm div go from hidden to visible but not sure.

try calling editor.refresh() after the editor is shown again. This should solve it,