Show More
@@ -9,19 +9,15 var IPython = (function (IPython) { | |||
|
9 | 9 | var key = IPython.utils.keycodes; |
|
10 | 10 | |
|
11 | 11 | // what is the common start of all completions |
|
12 | function _existing_completion(item, completion_array) | |
|
13 | { | |
|
14 | if(item.substr(0,1) == '.') | |
|
15 | { | |
|
16 | for( var c in completion_array ) | |
|
17 | { | |
|
12 | function _existing_completion(item, completion_array){ | |
|
13 | if(item.substr(0,1) == '.') { | |
|
14 | for( var c in completion_array ) { | |
|
18 | 15 | if(completion_array[c].substr(-item.length) == item) |
|
19 | 16 | { return true; } |
|
20 | 17 | } |
|
21 | 18 | return false; |
|
22 | 19 | } |
|
23 | else | |
|
24 | {return completion_array.indexOf(item) != -1} | |
|
20 | else {return completion_array.indexOf(item) != -1} | |
|
25 | 21 | } |
|
26 | 22 | |
|
27 | 23 | function shared_start(B) { |
@@ -132,12 +128,9 var IPython = (function (IPython) { | |||
|
132 | 128 | var filterd_results = Array(); |
|
133 | 129 | //remove results from context completion |
|
134 | 130 | //that are already in kernel completion |
|
135 | for(var elm in results) | |
|
136 | { | |
|
131 | for(var elm in results) { | |
|
137 | 132 | if(_existing_completion(results[elm]['str'],matches) == false) |
|
138 | { | |
|
139 | filterd_results.push(results[elm]); | |
|
140 | } | |
|
133 | { filterd_results.push(results[elm]); } | |
|
141 | 134 | } |
|
142 | 135 | |
|
143 | 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