ajaxorg/cloud9 — pull request #1024 by gjtorikian (2012-03-02 01:29:28+00:00)
Title: Ext/replaceall

This is the client-side portion of finding and replacing in files, the other half of which is here: https://github.com/mikedeboer/jsDAV/pull/33

In addition, there were some changes made throughout; I'll go through them one-by-one:

For #806, I changed quicksearch.js. The idea is easy: if the length of the text entered is greater than three, and you've just pressed a certain key (alphanumerics, quotation marks, brackets, e.t.c.), then the search is executed. The length of three is somewhat arbitrary, but I noticed that having it fire at just one letter (_i.e._ `f`) was incredibly annoying. Also having it fire for backspaces, spaces, and shift keys was also annoying--hence the limited keycode set.

_searchinfiles.js_ and _searchinfiles.xml_ now have the "Replace All" button added. I also removed the dropdown-menu for "files to search on." I have no idea what function this menu was supposed to provide--perhaps limiting the user's ability to search across too many files? We already limit it to 50; we should let the user cast a string og `*.js, *.cs, *.c` if they so wish. Blank entries act the same as `*.*`. Also, the "Find" textbox is now a multiline textarea, per Ruben's choice.

For #516, I changed the behavior of _searchinfiles.js_ to remember the current cursor position, then jump back to it when done doing the replace.