The Wayback Machine - https://web.archive.org/web/20240823150916/https://github.com/atom/find-and-replace/pull/651
Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Prevent 'getSelectedBufferRanges' uncaught exception #651

Merged
merged 2 commits into from
Feb 1, 2016
Merged

Prevent 'getSelectedBufferRanges' uncaught exception #651

merged 2 commits into from
Feb 1, 2016

Conversation

philae-ael
Copy link
Contributor

This PR just fixes #619

@lee-dohm
Copy link
Contributor

Is it possible to create a spec for this?

@philae-ael
Copy link
Contributor Author

Problem

Find and replace crash when you try to toogle options such as regex in a non-text tab (i.e img,etc. Cf repro in #619)

Correction

If the tab isn't a text tab, the editor object will be none I just had to handle it in anyMarkersAreSelected. Futhermore, there is no markers available, so, handle this in selectFirstMarker*

Sorry for my bad english

@lee-dohm
Copy link
Contributor

What I meant was, can you write some automated tests to ensure that we don't accidentally break this fix in the future?

@lee-dohm lee-dohm changed the title Fixes #619 Prevent 'getSelectedBufferRanges' uncaught exception Jan 26, 2016
@philae-ael
Copy link
Contributor Author

Done
Sorry, I had no time to write that before now.

lee-dohm added a commit that referenced this pull request Feb 1, 2016
Prevent 'getSelectedBufferRanges' uncaught exception
@lee-dohm lee-dohm merged commit 33e7a11 into atom:master Feb 1, 2016
@lee-dohm
Copy link
Contributor

lee-dohm commented Feb 1, 2016

Thanks for contributing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.