Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken/unusable editor after foldAll command on specific file #7088

Open
msimic opened this issue Feb 29, 2024 · 0 comments
Open

Broken/unusable editor after foldAll command on specific file #7088

msimic opened this issue Feb 29, 2024 · 0 comments

Comments

@msimic
Copy link

msimic commented Feb 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant