mapbox/tm2 — pull request #433 by samanpwbb (2014-06-11 21:43:49+00:00)
Title: Fix search

Search bar behaves more like how user would expect. From https://github.com/mapbox/tm2/issues/191, I hit these:

- [x] cmd+f when search is already open should not open browser search.
- [x] Allow user to create a new search based on old search. Right now if a search is in, no way to reset it and start a new search.
- [x] cmd+g only works after search has been started. Cannot start a search with cmd+g.
- [x] Clarify that user must press 'return' to view results. A 'go' button will solve this problem.
- [x] Allow user to press escape to dismiss search UI (currently only works if input is active)
- [x] Do not obscure code with search bar
- [x] When dismissing search, remove all highlights in code.

I did not hit:
- [ ] On switching tabs, dismiss search from formerly active tab.
- [ ] inform user of number of search results or if search result failed.

But I will eventually. Would prefer to get this merged them tackle the unfinished points later.

This PR also removes find/replace. It was confusing/unusable in it's prior state.