From 230ea32f0def75caea0e0be5b891adeb21482d3e Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Thu, 26 Feb 2015 18:31:43 -0800 Subject: [PATCH] Dont recompute values --- IPython/html/static/notebook/js/completer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/completer.js b/IPython/html/static/notebook/js/completer.js index 5746b6dab..17f891999 100644 --- a/IPython/html/static/notebook/js/completer.js +++ b/IPython/html/static/notebook/js/completer.js @@ -203,12 +203,14 @@ define([ // append the introspection result, in order, at at the beginning of // the table and compute the replacement range from current cursor // positon and matched_text length. + var from = utils.from_absolute_cursor_pos(this.editor, start); + var to = utils.from_absolute_cursor_pos(this.editor, end); for (i = matches.length - 1; i >= 0; --i) { filtered_results.unshift({ str: matches[i], type: "introspection", - from: utils.from_absolute_cursor_pos(this.editor, start), - to: utils.from_absolute_cursor_pos(this.editor, end) + from: from, + to: to }); }