Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make :e auto completions show all files if input is empty

  • Loading branch information...
commit f99da4ebc22459bd7e188f78074bdd4894a82ca4 1 parent 0ae5bb3
Per Thulin authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 filesystem.js
7 filesystem.js
View
@@ -3,6 +3,7 @@
*/
function RemoteFileSystem(eventSystem) {
var self = this;
+ self.files;
self.autoSuggestList = null;
self.path = null;
self.host = null;
@@ -50,6 +51,7 @@ function RemoteFileSystem(eventSystem) {
if (xhr.responseText) {
var json = JSON.parse(xhr.responseText);
self.autoSuggestList.load(json);
+ self.files = json;
}
}
};
@@ -71,6 +73,10 @@ function RemoteFileSystem(eventSystem) {
var autoCompletions = this.autoSuggestList.getSuggestions(q);
var autoCompletion;
+ if (!autoCompletions) {
+ autoCompletions = self.files;
+ }
+
if (autoCompletions) {
for (i = 0; i < autoCompletions.length; i += 1) {
autoCompletion = autoCompletions[i];
@@ -82,6 +88,7 @@ function RemoteFileSystem(eventSystem) {
});
}
}
+
return suggestions;
};
Please sign in to comment.
Something went wrong with that request. Please try again.