##// END OF EJS Templates
bracket on same line
Matthias BUSSONNIER -
Show More
@@ -9,19 +9,15 var IPython = (function (IPython) {
9 var key = IPython.utils.keycodes;
9 var key = IPython.utils.keycodes;
10
10
11 // what is the common start of all completions
11 // what is the common start of all completions
12 function _existing_completion(item, completion_array)
12 function _existing_completion(item, completion_array){
13 {
13 if(item.substr(0,1) == '.') {
14 if(item.substr(0,1) == '.')
14 for( var c in completion_array ) {
15 {
16 for( var c in completion_array )
17 {
18 if(completion_array[c].substr(-item.length) == item)
15 if(completion_array[c].substr(-item.length) == item)
19 { return true; }
16 { return true; }
20 }
17 }
21 return false;
18 return false;
22 }
19 }
23 else
20 else {return completion_array.indexOf(item) != -1}
24 {return completion_array.indexOf(item) != -1}
25 }
21 }
26
22
27 function shared_start(B) {
23 function shared_start(B) {
@@ -132,12 +128,9 var IPython = (function (IPython) {
132 var filterd_results = Array();
128 var filterd_results = Array();
133 //remove results from context completion
129 //remove results from context completion
134 //that are already in kernel completion
130 //that are already in kernel completion
135 for(var elm in results)
131 for(var elm in results) {
136 {
137 if(_existing_completion(results[elm]['str'],matches) == false)
132 if(_existing_completion(results[elm]['str'],matches) == false)
138 {
133 { filterd_results.push(results[elm]); }
139 filterd_results.push(results[elm]);
140 }
141 }
134 }
142
135
143 // append the introspection result, in order, at at the beginning of
136 // append the introspection result, in order, at at the beginning of
General Comments 0
You need to be logged in to leave comments. Login now