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