brackets-code-folding
brackets-code-folding copied to clipboard
Ctrl+Shift+arrow causes error and weird behaviour
When I press Ctrl+Shift+up/down, I get this error in the console:
Uncaught TypeError: Cannot read property 'from' of undefined foldgutter.js:72
_isCurrentlyFolded foldgutter.js:72
updateFoldInfo foldgutter.js:93
onChange foldgutter.js:279
(anonymous function) /thirdparty/CodeMirror2/lib/codemirror.js:7154
fireCallbacksForOps /thirdparty/CodeMirror2/lib/codemirror.js:1982
endOperation /thirdparty/CodeMirror2/lib/codemirror.js:1997
runInOp /thirdparty/CodeMirror2/lib/codemirror.js:2140
CodeMirror.operation /thirdparty/CodeMirror2/lib/codemirror.js:4426
Document.batchOperation /document/Document.js:404
Document.doMultipleEdits /document/Document.js:618
moveLine /editor/EditorCommandHandlers.js:839
moveLineDown /editor/EditorCommandHandlers.js:870
Command.execute /command/CommandManager.js:93
execute /command/CommandManager.js:287
_handleKey /command/KeyBindingManager.js:608
_handleKeyEvent /command/KeyBindingManager.js:787
Which causes Brackets to select to the beginning/end of the document from the current caret position.
This is on Windows 7 x64 and Brackets 1.0.
@thany could you clarify the expected behaviour?
Thanks.
Well, first of all, no error :) Ctrl+Shift+up/down normally moves a line/selection up or down.
Btw, I can't always repro this bug. I removed and reinstalled this extension and it went away, at least for the moment.
Ok. Let's keep this open. Please update if you are able to consistently reproduce the issue.
I found new behaviour that might be related. Sometimes, Ctrl+Shift+arrow does two things, which is to move the selection up/down first, and then also extend the selection by a line as if Shift+arrow was pressed.
Every time that happens, there's this error in the console:
Uncaught TypeError: Cannot read property 'from' of undefined foldgutter.js:72
_isCurrentlyFolded foldgutter.js:93
updateFoldInfo foldgutter.js:137
(anonymous function) /thirdparty/CodeMirror2/lib/codemirror.js:2241
runInOp /thirdparty/CodeMirror2/lib/codemirror.js:4543
CodeMirror.operation foldgutter.js:136
updateInViewport foldgutter.js:285
Sorry, forgot to mention that this is now Brackets 1.3 again, now that I've workaround'ed the scrolling issue. Not sure if this is your thing though, but I do see parts of your extension...