Expected behavior:
CodeMirror should always render the value of value prop.
Bug
Under rare circumstances, the value of value may not match what is rendered.
For example, the final value that is rendered in CodeMirror should be "second", but can sometimes be "first".
<script>
let value = "first";
onMount(() => {
value = "second"
})
</script>
<CodeMirror bind:value />
This bug can be solved by not returning on this line, so that editor state is always updated when value changes.
This bug may be caused by this line, if view and value change at the same tick, the second change of value may be marked as the first change and update is skipped.