mirror of
https://codeberg.org/uzu/strudel
synced 2026-09-05 06:57:35 -04:00
fix: map highlighting changes
This commit is contained in:
@@ -50,6 +50,9 @@ const highlightField = StateField.define({
|
||||
return Decoration.none;
|
||||
},
|
||||
update(highlights, tr) {
|
||||
// proper fix for https://github.com/tidalcycles/strudel/issues/178
|
||||
// see https://discuss.codemirror.net/t/uncatchable-out-of-range-errors-when-document-changes/4864/5
|
||||
highlights = highlights.map(tr.changes);
|
||||
try {
|
||||
for (let e of tr.effects) {
|
||||
if (e.is(setHighlights)) {
|
||||
|
||||
Reference in New Issue
Block a user