Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Update find-and-replace #18649
Requirements for Contributing a Bug Fix
Identify the Bug
See atom/find-and-replace#966, which fixes 5 issues!
find-and-replace was mistakenly assuming that any object with a buffer was also a text editor, which is usually but not always the case, leading to some nasty uncaught exceptions when using plantuml-viewer.
Description of the Change
@howyi and I worked together to craft a PR that makes sure the object is a TextEditor instead of checking for the existence of a buffer.
There were a couple of alternatives explored - accessing the buffer using
In the very unlikely event that there's some Atom package out there that implements all the methods that find-and-replace needs to perform correctly yet isn't a TextEditor, find-and-replace will no longer work with that package.
The test suite was also run.
Fixed an issue where find-and-replace would not work correctly with plantuml-viewer.