-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Showstopper bug encountered...
The attached code when used in a CodeMirror instance with the following config, and after doing the "foldAll" command give the error and continues giving the error on every attempt to scroll, making the editor completely unusable.
Error:
TypeError: Cannot read properties of undefined (reading 'line') at cmp (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:986:42) at compareCollapsedMarkers (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:1502:17) at collapsedSpanAtSide (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:1514:22) at collapsedSpanAtEnd (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:1520:46) at visualLineContinued (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:1573:21) at new LineView (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:2004:17) at updateExternalMeasurement (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:2369:46) at prepareMeasureForLine (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:2407:16) at cursorCoords (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:2662:47) at TextareaInput.prepareSelection (http://localhost:6060/modules/codemirror_module.min.js?hash=1.6.2:9461:21)]]
CodeMirror config:
let config = { mode: mode, lineWiseCopyCut: false, theme: "neat", autoRefresh: true, matchBrackets: true, lineNumbers: true, scrollbarStyle: "overlay", tabSize: 2, keyMap: "sublime", autoCloseBrackets: true, foldGutter: true, styleActiveLine: true, search: { bottom:true}, gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], extraKeys: {"Ctrl-Space": "autocomplete", "Alt-F": "findPersistent"}, };
File that exibits this behavior, with cursor position anywhere is attached.
foldAll_bug_example.zip