Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

@jasonrudolph
Copy link
Contributor

#282 updated the docs for TextBuffer::setTextInRange to deprecate the undo option. atom/atom#16956 points out that there are other public methods whose docs reference the undo option. This pull request updates the docs for those other methods so that they also identify the undo option as deprecated. It also emits a deprecation warning whenever the undo option is used.

@jasonrudolph
Copy link
Contributor Author

To verify that the deprecation warning is wired up correctly, I ran Atom in dev mode and executed the following code in the console:

atom.workspace.getActiveTextEditor().getBuffer().setTextInRange([[0,0], [0,1]], 'foo', {undo: 'skip'})

Afterwards, Atom correctly reports the use of this deprecated option:

image

@jasonrudolph jasonrudolph merged commit 35695c4 into master Apr 9, 2018
@jasonrudolph jasonrudolph deleted the deprecate-skip-undo-option branch April 9, 2018 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants