Show More
@@ -116,12 +116,28 var IPython = (function (IPython) { | |||||
116 |
|
116 | |||
117 | var cur = this.editor.getCursor(); |
|
117 | var cur = this.editor.getCursor(); | |
118 | var results = CodeMirror.contextHint(this.editor); |
|
118 | var results = CodeMirror.contextHint(this.editor); | |
|
119 | var filterd_results = Array(); | |||
|
120 | console.log('results',results) | |||
|
121 | //remove results from context completion | |||
|
122 | //that are already in kernel completion | |||
|
123 | for(var elm in results) | |||
|
124 | { | |||
|
125 | if(matches.indexOf(results[elm]['str']) == -1) | |||
|
126 | { | |||
|
127 | //filterd_results.push(elm); | |||
|
128 | console.log('adding',results[elm]) | |||
|
129 | } | |||
|
130 | else | |||
|
131 | { | |||
|
132 | console.log('skipping ',results[elm]); | |||
|
133 | } | |||
|
134 | } | |||
119 |
|
135 | |||
120 | // append the introspection result, in order, at at the beginning of |
|
136 | // append the introspection result, in order, at at the beginning of | |
121 | // the table and compute the replacement range from current cursor |
|
137 | // the table and compute the replacement range from current cursor | |
122 | // positon and matched_text length. |
|
138 | // positon and matched_text length. | |
123 | for (var i = matches.length - 1; i >= 0; --i) { |
|
139 | for (var i = matches.length - 1; i >= 0; --i) { | |
124 | results.unshift({ |
|
140 | filterd_results.unshift({ | |
125 | str: matches[i], |
|
141 | str: matches[i], | |
126 | type: "introspection", |
|
142 | type: "introspection", | |
127 | from: { |
|
143 | from: { | |
@@ -136,7 +152,7 var IPython = (function (IPython) { | |||||
136 | } |
|
152 | } | |
137 |
|
153 | |||
138 | // one the 2 sources results have been merge, deal with it |
|
154 | // one the 2 sources results have been merge, deal with it | |
139 | this.raw_result = results; |
|
155 | this.raw_result = filterd_results; | |
140 |
|
156 | |||
141 | // if empty result return |
|
157 | // if empty result return | |
142 | if (!this.raw_result || !this.raw_result.length) return; |
|
158 | if (!this.raw_result || !this.raw_result.length) return; |
General Comments 0
You need to be logged in to leave comments.
Login now