MackieLoeffel / atom-auto-fold

Atom package for folding
MIT License
1 stars 1 forks source link

TextEditor.get is deprecated. #2

Closed NetOpWibby closed 7 years ago

NetOpWibby commented 7 years ago

TextEditor.prototype.displayBuffer has always been private, but now it is gone. Reading the displayBuffer property now returns a reference to the containing TextEditor, which now provides some of the API of the defunct DisplayBuffer class.

TextEditor.get (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:101:14)
<unknown> (/Users/netopwibby/.atom/packages/auto-fold/lib/auto-fold.coffee:50:26)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:334:16)
Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:265:34)
MackieLoeffel commented 7 years ago

I can't reproduce the issue. Are you using the current version of the package?

There is neither a call to TextEditor.get nor an access of TextEditor.prototype.displayBuffer in the package, or am I missing something? Line 50 in auto-fold.coffee, which your Stacktrace points to, calls isBufferRowCommented, which is a documented function (see https://github.com/MackieLoeffel/atom-auto-fold/blob/master/lib/auto-fold.coffee#L50).

NetOpWibby commented 7 years ago

This is what I see.

ss 2017-01-16 at 11 23 05 am

My Atom version is 1.13.0 and auto-fold is 0.3.0

MackieLoeffel commented 7 years ago

Ah, ok, it is a deprecation warning. Thank you very much for reporting. It should be fixed in the newest version.