diff --git a/IPython/html/static/notebook/js/completer.js b/IPython/html/static/notebook/js/completer.js index 5386a4a7e..fd05a217d 100644 --- a/IPython/html/static/notebook/js/completer.js +++ b/IPython/html/static/notebook/js/completer.js @@ -53,7 +53,12 @@ var IPython = (function (IPython) { tem1 = tem1.substring(0, --s); } if (tem1 == "" || tem2.indexOf(tem1) != 0) { - return prepend_n_prc('', min_lead_prct); + return { + str:prepend_n_prc('', min_lead_prct), + type: "computed", + from: B[0].from, + to: B[0].to + } } return { str: prepend_n_prc(tem1, min_lead_prct), @@ -102,7 +107,7 @@ var IPython = (function (IPython) { // we need to check that we are still on a word boundary // because while typing the completer is still reinvoking itself - if (!/[0-9a-z._/\\:~-]/i.test(pre_cursor)) { + if (!/[%0-9a-z._/\\:~-]/i.test(pre_cursor)) { this.close(); return; }