Is Selection | Split into Lines working with React?


#1

When I try to use it on a large block of text I get errors saying:

Uncaught TypeError: Cannot call method 'getBufferPosition' of undefined /Applications/Atom.app/Contents/Resources/app/src/editor.js:1384
module.exports.Editor.getCursorBufferPosition /Applications/Atom.app/Contents/Resources/app/src/editor.js:1384
module.exports.CursorPositionView.updateCursorPositionText /Applications/Atom.app/Contents/Resources/app/node_modules/status-bar/lib/cursor-position-view.js:40
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/status-bar/lib/cursor-position-view.js:3
jQuery.event.dispatch /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360
jQuery.event.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119
jQuery.extend.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590
jQuery.fn.jQuery.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237
jQuery.fn.extend.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118
module.exports.React.createClass.componentWillUpdate /Applications/Atom.app/Contents/Resources/app/src/editor-component.js:234
ReactCompositeComponentMixin._performComponentUpdate /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeCompon…:1255
ReactCompositeComponentMixin._performUpdateIfNecessary /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeCompon…:1207
Mixin.perform /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:159
ReactComponent.Mixin.performUpdateIfNecessary /Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactComponent.js:478
ReactCompositeComponentMixin.performUpdateIfNeces

#2

Define “large block of text”? I just tried it with 10 lines and it worked fine. Then I opened editor-view.coffee (over 1500 lines) and the editor just spun. Tried it again with only the first 100 lines and it worked fine. At no time did I get an error though.

Can you reproduce this with atom --safe?


#3

I’ve just tried it on exactly the same content (150 lines of git lol output) and it worked fine. I have restarted Atom since last time, so maybe it was something funky hanging around. I know if I have a problem again, just to restart.

Hopefully though the stack trace may help some developer see what was happening…

Thanks for your reply.