atom/find-and-replace — pull request #227 by izuzak (2014-06-03 15:40:31+00:00)
Title: Always use editor selections for populating the query in the project find-and-replace view

Fixes https://github.com/atom/find-and-replace/issues/226

Currently, the project find-and-replace view is populated with the selected text as the search query only when the view doesn't already contain some text. In other words, the query would be populated with the selected text only when the project find-and-replace view was shown for the first time.

Users reported that this isn't matching their expectations, and also this doesn't match how the "normal" (non-project) find-and-replace view works.

This pull request changes how the project find-and-replace view is populated to match the "normal" find-and-replace view:
* if some text is selected in the editor, then this text will always be used to populate the search query in the find-and-replace view
* if no text is selected, then the previous query from the find-and-replace view will be used

cc @benogle for :eyes:, related to changes from https://github.com/atom/find-and-replace/commit/3613426746971d5e6662defcf883da282d060e75. Also wondering if this is something we should try and write tests for?