rstudio/rstudio — pull request #239 by kevinushey (2014-12-03 01:02:45+00:00)
Title: fuzzy file searching within project

NOTE: Not ready for merge, but ready for discussion. This work supersedes #235 by integrating the same functionality into the existing completion popup display.

![file-search](https://cloud.githubusercontent.com/assets/1976582/5273923/c9006466-7a42-11e4-9bc0-997b50ac2099.gif)

To make this efficient, we re-work the completion display a little bit:

1. We display a maximum of 100 completions in the UI popup, and display a `Completion list is truncated` message below if there are too many to display, to ensure a fast UI response.

2. If there are too many completions (> 2000), then we do not even bother sorting the list, as this will be too slow. However, when it is not too large we use a priority queue to obtain a partial sort of the top 100 items.

Note that I currently still rely on `list.files`, as I discovered that the source file indexer does not index all files (it seems that certain extensions are omitted, and I think this could eventually frustrate some users looking for files with an un-indexed file type).