##// END OF EJS Templates
don't need to check for leading dot
Matthias BUSSONNIER -
Show More
@@ -8,18 +8,15 b' var IPython = (function (IPython) {'
8 8 // easyier key mapping
9 9 var key = IPython.utils.keycodes;
10 10
11 // what is the common start of all completions
12 11 function _existing_completion(item, completion_array){
13 if(item.substr(0,1) == '.') {
14 for( var c in completion_array ) {
15 if(completion_array[c].substr(-item.length) == item)
16 { return true; }
17 }
18 return false;
19 }
20 else {return completion_array.indexOf(item) != -1}
12 for( var c in completion_array ) {
13 if(completion_array[c].substr(-item.length) == item)
14 { return true; }
15 }
16 return false;
21 17 }
22 18
19 // what is the common start of all completions
23 20 function shared_start(B) {
24 21 if (B.length == 1) {
25 22 return B[0];
@@ -129,7 +126,7 b' var IPython = (function (IPython) {'
129 126 //remove results from context completion
130 127 //that are already in kernel completion
131 128 for(var elm in results) {
132 if(_existing_completion(results[elm]['str'],matches) == false)
129 if(_existing_completion(results[elm]['str'], matches) == false)
133 130 { filterd_results.push(results[elm]); }
134 131 }
135 132
General Comments 0
You need to be logged in to leave comments. Login now