logue / vue-codemirror6

⌨️ @codemirror 6 component for @vuejs. Vue2 & Vue3 both supported.
https://logue.dev/vue-codemirror6/
MIT License
123 stars 16 forks source link

fix: editor not update content when `modelValue` change and selection is out of range #44

Open KrialY opened 2 weeks ago

KrialY commented 2 weeks ago

When change the modalValue of CodeEditor, if the current selection is out of range, the code editor content will not change.I think reset the selection range is better.

If you select the end line, then click the "change" button, code editor content will not change. image CodeSandbox: https://codesandbox.io/p/devbox/laughing-bas-pn64jc?file=%2Fsrc%2Fcomponents%2FHelloWorld.vue%3A8%2C5